SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    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.



    http://pixelitforward.com

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,200
    Mentioned
    456 Post(s)
    Tagged
    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
    Location
    Madison, WI
    Posts
    2,802
    Mentioned
    34 Post(s)
    Tagged
    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


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
  •