proud Posted February 27, 2007 Share Posted February 27, 2007 I want to design 2 seperate content boxes in one page but this code doesnt generate but only one content box so what code is missing or what is supposed to be corrected? <style type="text/css"> <!-- #contentbox { background: #E5E5E5; padding: 5px; width: 500px; height: 340px; overflow: auto; } --> </style> echo "<div id=\"contentbox\">\n"; echo "hello"; echo "</div>\n"; echo "<div id=\"contentbox\">\n"; echo "hello"; echo "</div>\n"; Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted February 27, 2007 Share Posted February 27, 2007 you should not have 2 elements with the same id in one page of html... use class instead. <style type="text/css"> <!-- .contentbox { background: #E5E5E5; padding: 5px; width: 500px; height: 340px; overflow: auto; } --> </style> echo "<div class=\"contentbox\">\n"; echo "hello"; echo "</div>\n"; echo "<div class=\"contentbox\">\n"; echo "hello"; echo "</div>\n"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.