SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    Nottingham, UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with width in 2 col layout

    Hi,

    I posted last week and received some great help with my custom 2 column layout. However, I have run into a snag.

    If I put a table in the main section of the page, the page scrolls but doesn't automatically extend the header and footer. You can see the effect ast the following URL

    http://www.spibey.com/test/

    The positional styles are held in this stylesheet
    http://www.spibey.com/test/position.css

    The visual styles are held in this stylesheet
    http://www.spibey.com/test/style.css

    Does anyone have any suggestions about how to sort this out?

    Cheers

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

    Why don't you make the table have the scrollbar rather than making the page about 500% wide?

    Wrap the table in a div and apply this css:
    Code:
    #tableholder {width:99%;overflow:auto;}
    This keeps the table in view and allows for the table to scroll while the page is unaffected. As the table is almost most of the screen width anyway there's not much difference to having the scrollbar on the table rather than on the whole page which wrecks the layout.

    Otherwise you will need to put your header and footer back in the flow and take out the absolute positioning and also any widths set in those elements so that the page expands to max. (But a 500% (approx) wide page will look very odd, which is why I recommend scrolling the table instead).

    Paul

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Location
    Nottingham, UK
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's great thanks paul. I wouldn't use a table normally but the page is generated by ASP.NET so I have no choice.


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
  •