Results 1 to 4 of 4

Thread: CSS: clear:both only inside parent div

  1. #1
    Future AstonMartin driver r2d2's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,608

    CSS: clear:both only inside parent div

    I use floating divs for the left and right columns of my site, and put my actual content in the main centre content div. Now, in this div I float pictures right in my review section.

    If I want to put something below the floated picture by using clear:both, this clears the picture and my left and right columns, which is obviously not good!

    Anyone know how to restrict the clear:both attribute to just the div that the float is in?

  2. #2
    Junior Registered
    Join Date
    Feb 2004
    Posts
    2
    No - but I'd also really like to know if this is possible...

    -!aibo

  3. #3
    Junior Registered
    Join Date
    Feb 2004
    Posts
    2
    Actually, after a few minutes googling, I've found that complexspiral have an interesting solution to this one:

    http://www.complexspiral.com/publica...aining-floats/

    See the paragraph headed "Set a Float to Fix a Float"

    Hope it helps

    -!aibo

  4. #4
    Future AstonMartin driver r2d2's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,608
    Excellent cheers, will have a go at that tonight! Welcome to Web Pub

Similar Threads

  1. can google follow links inside forms?
    By Apollo in forum Search Engine Optimization
    Replies: 12
    Last Post: 06-19-2004, 10:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •