This could go in either html and css, but its more of an html problem than a css i would think :S ---- Okay, so on my site, i have a side box that changed when you login or logout. Taht works fine, but i have an announcement div, that i want to display with a custom message. When i put <div id="announcement">Hello peoples!</div> it breaks apart the other divs. heres my announcement div. #announcement { width: 139px; border: solid #3636FF 1px; padding: 4px; text-align: center; background-color: #DADAFF; font-size: 10px; font-family: arial; } Code (markup): and heres my login box <div id="main_box"> <h2>» <?php echo $login_title; ?> </h2> <p class="center"> <?php if($logged == 1) { echo $date; ?></p> <div id="announcement">Hello Peoples!</div> <p><?php echo $login; } else { echo $login; } ?> </p> </div> Code (markup): anyone know what could be wrong?
it's kind of hard to see what it is without actually seeing the whole code, it could be something really simple as a float or position error.
1. Are you using a universal reset? If not, google it. 2. Remove the padding from that and use margins for the elements inside (#announcement)
Maybe the announcement div is to wide? But as the others say - without seeing the page in question, you wont get a proper answer.
i am using a universal reset, and the webpage in question is http://bobbanation.freehostia.com (i thought i provided this link in the first post. sorry) you can view source to see whats going on, or i will give you a little snapshot of what is going on <div id="main_box"> <h2>» Welcome Homer! </h2> <p class="center"> Thursday, November 8, 2007</p><div id="announcement">Hello people!</div> <a href="/forum/ucp.php?i=pm&folder=inbox&sid=2a23c630ecdb37e495b04f4ac1f0bff0">Inbox (0)</a> | <a href="forum/ucp.php?mode=logout&sid=2a23c630ecdb37e495b04f4ac1f0bff0">Logout</a> </div> Code (markup):
argh, it was the wrong url http://absolutehabbo.freehostia.com you need to login to show though. sorry again,