nathanmaxsonadil Posted December 20, 2007 Share Posted December 20, 2007 Hi all, I'm wondering how to make every other div have an _ at the end of it? like div1 and then div1_ and then div1 again so on Hope you guys can help Nathan Link to comment https://forums.phpfreaks.com/topic/82521-solved-altertnating-divs/ Share on other sites More sharing options...
kenrbnsn Posted December 20, 2007 Share Posted December 20, 2007 How are you generating the code? Ken Link to comment https://forums.phpfreaks.com/topic/82521-solved-altertnating-divs/#findComment-419487 Share on other sites More sharing options...
adam291086 Posted December 20, 2007 Share Posted December 20, 2007 $color = "#ffffff"; $color1 = "#ffffff"; $color2 = "#e0e0e0"; if ($color == $color1){ $color = $color2; }ELSE{ $color = $color1; } This is what revraz gave me the otherday for alternating colours Link to comment https://forums.phpfreaks.com/topic/82521-solved-altertnating-divs/#findComment-419489 Share on other sites More sharing options...
kenrbnsn Posted December 20, 2007 Share Posted December 20, 2007 That's not what the OP asked. Ken Link to comment https://forums.phpfreaks.com/topic/82521-solved-altertnating-divs/#findComment-419490 Share on other sites More sharing options...
nathanmaxsonadil Posted December 20, 2007 Author Share Posted December 20, 2007 $color = "#ffffff"; $color1 = "#ffffff"; $color2 = "#e0e0e0"; if ($color == $color1){ $color = $color2; }ELSE{ $color = $color1; } This is what revraz gave me the otherday for alternatibg colours I think I can use that I have a 2 column wordpress theme that I want to make widget compatible into 1 sidebar, the two column 's are right next to each other so div1 would be telling it to go on the left and div1_ on the right. Link to comment https://forums.phpfreaks.com/topic/82521-solved-altertnating-divs/#findComment-419496 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.