SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can't scroll to div floating left

    hi all,
    this is a weird one:
    -i have a centered div (position:absolute;left:50%;margin-left:-half width)
    -there is a menu floating left inside this div

    when the browser window is narrow enough that you can't see the menu, the scroll bar only takes you to the right edge, not the left edge of the menu, so you can't see it at all if the window is too narrow. this happens in firefox/safari/ie

    this could of course be a problem for someone visiting the site for the first time. any help greatly appreciated.

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't use that centring method then. Make the centred div margin: 0 auto instead.

  3. #3
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks tyssen
    for some reason i thought that method didn't work in ie but looks like i was wrong. much simpler!

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't work in IE < 6. You need to add text-align: center to your site's container for those browsers.


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
  •