March 7, 200917 yr Hey guys. CSS : http://www.hilldesigns.co.uk/client/trulys...ludes/style.css HTML : http://www.hilldesigns.co.uk/client/trulyscrumptious Right, now you have the files.. My problem is that red bar at the bottom.. At the moment its displaying behind the text, but I want it displayed UNDER it. Its displaying alright in Dreamweaver, which is odd, cause its usually the other way round. Displaying right on the web, but looking odd in DW. Thanks for any help, Anyone who fixes it gets a high five !
March 7, 200917 yr The code looks weird... Why are you doing it like this: <div class = "something"></div> Take out the spaces before your '=' signs.
March 7, 200917 yr Author The code looks weird... Why are you doing it like this: <div class = "something"></div> Take out the spaces before your '=' signs. Appreciate the comment but its besides the point. My code still validates. I wouldnt tell you to start a PHP script with <?php rather than just <? if technically there was no reason? Cheers, Lew.
March 7, 200917 yr you need a float: left for the footer .footerWrapper { width: 100%; height: 200px; background-color: #d53030; float:left; }
March 7, 200917 yr Author you need a float: left for the footer .footerWrapper { width: 100%; height: 200px; background-color: #d53030; float:left; } *HIGHFIVE* Can you explain why thats fixed it though? Cheers mate!
March 7, 200917 yr The code looks weird... Why are you doing it like this: <div class = "something"></div> Take out the spaces before your '=' signs. Think he was asking for help, not tips on how to beautify his code. Anyway Lewwy, it would appear that your problem is that you've added your clear div within your content div rather than after it. Also, you don't need to use an empty div to create the clear. You can do it like so: <br class="clear" /> It does exactly the same thing as before, just in a cleaner way. This is how your html should look now: <div class="rightContent">Hello</div> </div> </div> <br class="clear" /> <div class="footerWrapper"></div> </div> Now where's my high five?
March 7, 200917 yr Author Think he was asking for help, not tips on how to beautify his code. Anyway Lewwy, it would appear that your problem is that you've added your clear div within your content div rather than after it. Also, you don't need to use an empty div to create the clear. You can do it like so: <br class="clear" /> It does exactly the same thing as before, just in a cleaner way. This is how your html should look now: <div class="rightContent">Hello</div> </div> </div> <br class="clear" /> <div class="footerWrapper"></div> </div> Now where's my high five? Thanks mate. Both suggestions work beautifully. I need to read up on clear divs... I *always* put them in the wrong place!
March 7, 200917 yr Just remember that your clear needs to be sandwiched between your two divs. So if you take the website you just posted as an example, because the text within your content div is floated left, your clear needs to come right after that div, and before the next following div. Right in the middle, just make sure to place the clear after the closing div tags of the previous div .
March 7, 200917 yr Well... I was just trying to help... Thanks anyways. EDIT: BTW, you shouldn't start your PHP tags like this: <? you should use <?php it is best practice.
March 8, 200917 yr Clearing floated divs Seems you can just use overflow: auto in most cases, according to that link?
Create an account or sign in to comment