Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    15
    Thanked 2 Times in 2 Posts

    Prevent center DIV from resizing to max width?

    I have 3 divs:
    -Float:left (fixed width)
    -margin:0 auto; (uses min-width and max-width)
    -Float:right (fixed width)

    I wanted the middle DIV to fill the space between the other 2 DIVs however the middle DIV always go to the max width. (therefore it goes below the other 2 DIVs) How do you prevent it from doing that?

    Advanced Sorry.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,737
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    Hello kenshn111,
    Maybe that auto margin doesn't do what you think it does. have a look at this example.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    kenshn111 (12-31-2012)


  •  

    Posting Permissions

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