SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast scarecrow-rye's Avatar
    Join Date
    Nov 2005
    Location
    Cornwall, UK
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Centering Floated Divs

    Does anyone have any ideas about this little puzzle?

    I need to center align my fixed width DIV whist maintaining the DIVs natural nesting - so that interal elements do not overflow the parent DIV. Its a little hard to explain, so I've posted a sample at the following URL.

    http://www.cornflowerdesign.co.uk/examples/tabs/

    Any suggestions would be much appreciated. Thanks.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,275
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Why don't you just remove the float from .gutter and give it a height to hold the space open.

    Code:
    #menubar .gutter {
     margin: 0 auto;
     padding: 3px 0 10px;
     width: 720px;
     height:42px;
     }
    Or is that not what you meant

  3. #3
    SitePoint Enthusiast scarecrow-rye's Avatar
    Join Date
    Nov 2005
    Location
    Cornwall, UK
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Looks good

    There are times when I really do feel a complete muppet!

    I've put the height attribute in and it seems fine - it looks and expands as it should in IE and Firefox. Thanks.


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
  •