Old 02-06-2005, 17:51   #1 (permalink)
fishtankmedia
Registered User
 
Join Date: May 2005
Posts: 5
CSS trouble

Hi guys, i have been getting grief from this SIMPLE css I know it is something easy that I have overlooked. Anyone be able to give a quick look ? Would be much appreciated.


It's a really stripped down version of an in-progress layout....

If you look at the header on the page there is a double border... that is the bottom of the container div. Which should CONTAIN the text i.e. the border should be around the text!

Anyone any ideas? fix this and i'll give a helping hand if needed in the future. cheers dave.

http://www.fishtankmedia.com/research/contentPage.html

Last edited by fishtankmedia : 03-06-2005 at 08:18. Reason: updated url
  Reply With Quote
Old 02-06-2005, 17:59   #2 (permalink)
seen.to
unusual suspect ™
 
seen.to's Avatar
 
Join Date: Jul 2004
Location: DE, USA
Posts: 2,881
Add <br clear="all" /> before your final </div>

So this:

</div>
</body>
</html>

Becomes this:

<br clear="all" />
</div>
</body>
</html>
__________________
  Reply With Quote
Old 02-06-2005, 18:51   #3 (permalink)
fishtankmedia
Registered User
 
Join Date: May 2005
Posts: 5
Cheers

I've never encountered this before and the ammount of layouts i've done with this design without getting funky errors.

Trying to google for info around your fix! any chance you could let me in on the reason why that works? Thank's again.
  Reply With Quote
Old 03-06-2005, 04:34   #4 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,484
actually, while seen.to's solution works, it's not the best way to do this as you're adding superflous markup

it's best to handle the situation in your css file - the following link both explains why this is necessary and how to do it.

http://www.positioniseverything.net/easyclearing.html
__________________
  Reply With Quote
Old 03-06-2005, 06:58   #5 (permalink)
fishtankmedia
Registered User
 
Join Date: May 2005
Posts: 5
Cheers, that was a really good article.
-learn something every day!
Currently trying to enhance the layout above with a divider between the two sections.... using
#leftSection:{ border-right:1px ... }
works okay, but if the right section has more elements contained, than the left.... the border does not meet with the bottom.

Was considering implementing it with a positioned background image of a 1px line.... are there any better ways anyone knows of....


http://fishtankmedia.com/research/contentPage.html

Last edited by fishtankmedia : 03-06-2005 at 08:18. Reason: updated url
  Reply With Quote
Old 04-06-2005, 11:35   #6 (permalink)
nakedintruder
www.nakedintruder.com
 
nakedintruder's Avatar
 
Join Date: Jan 2005
Location: Leeds, Yorkshire
Posts: 383
Send a message via MSN to nakedintruder
<2 pence>
I normally do;
<div class="clr">&nbsp;</div>

.clr{clear:both;height:0px;font-size:0px}
</2 pence>
  Reply With Quote
Old 04-06-2005, 11:54   #7 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,484
if you'd bothered to read the link i posted you'd see why that's not advisable.

sigh.
__________________
  Reply With Quote
Old 05-06-2005, 11:13   #8 (permalink)
nakedintruder
www.nakedintruder.com
 
nakedintruder's Avatar
 
Join Date: Jan 2005
Location: Leeds, Yorkshire
Posts: 383
Send a message via MSN to nakedintruder
Yeh, it looked good up until "Toggle Trouble", where he added an extra <p> tag and then added a clearing <div> anyway, so I'm a bit lost on it, I'll read it again next week.

HTML Code:
<div class="guillotine-float"> <a href="#">Float Link</a><br> The non-floated links to the left are wrapped in a paragraph, and that paragraph has the Holly hack value applied to it. Say "buh-bye" to the Guillotine Bug! </div> <p class="clearfix" style="margin: 0pt;"> <a href="#">Link</a><br> <a href="#">Link</a><br> <a href="#">Link</a><br> <a href="#">Link</a><br> </p> </div> <div style="clear: both;"></div> </div>
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8