SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    0 Post(s)
    0 Thread(s)

    Container width??

    I have played with the CSS but I can not accomplish what I need to do. Right now, there is a pixel grid on my homepage in the main content area. This is 1000px wide, but it is cut off because the container is too small. How can I make this fit without shrinking the pixel grid, and keeping everything else the exact same, except the width of the content area? Thanks.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    462 Post(s)
    8 Thread(s)
    I can't really tell what you want to see in the end. You could, of course, change the #page width to something like 1200px.

  3. #3
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Madison, WI
    34 Post(s)
    2 Thread(s)
    Yeah. Your intent is kinda confusing there.. BUT there several basic point you need to keep in mind:

    1) if you have set a width to your container, and the calculated width ( padding+ width+margin) of your content is wider than the container width... the content will either overflow ( or be cropped if you have the 'overflow' property set to anything other than visible)

    2) if you HAVENT set a width for the CONTAINER then the container will be the width of it PARENT element

    3) In other words, the width of a container is NOT determined by it's children's width.

    4) that being said, remember that the calculated width is : padding+ width+margin. so if you set the width to both the container and the grid to be 1000px BUT then you added padding or margin to your grid... then it follows that it would be cropped or overflow the container.

    hope that helps


Posting Permissions

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