SitePoint Sponsor

User Tag List

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

    horiztonal scroll

    Hi guys, just need some advice if anyone can help.

    I am getting horizontal scrollbars at the bottom of my main content boxes in mozilla. I believe it is related to the overflow:auto; but I just wanted some advice.

    the site at the bottom of the main blue cell.
    the stylesheet

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Looks like you fixed it as i can't see any horizontal scrollbars now (unless the screen is smaller than 860px approx)

  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul,

    Thanks for the reply, the problem appears to still be there on my screen. I have uploaded a screenshot for you to have a look at.

    http://www.ozvoip.com/scroll.jpg

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

    Yes I can see it now - I'm not usre how I missed it

    You are right and its the overflow:auto that is causing the scrollbar. It seems to be caused by you wrapping an extra .box around your nested .box.

    Code:
      <div class="box">
       <div class="box"> <b>VoIP Australia.</b>
    	<p></p>
    	OzVoIP.com is currently <i>the</i> residential VoIP and business VoIP (Voice over Internet Protocol) specialist in Australia. We sell a variety of <a href="products.php" title="IP phones, analogue telephone adapters, routers with VoIP, Asterisk hardware and more!">voice over IP hardware</a> and complete <a href="category.php?id=11" title="Voice over IP and related services">Internet
    If you remove the parent .box then the scrollbar disappears. You could simply remove that parent and apply more padding to .box as that seems to be the only effect it is giving you.

    Why are you using overflow:auto anyway? If its just to clear floats then there doesn't seem to be any floats in there to clear that I can see immediately. If you remove the overflow:auto the scrollbar will go away anyway. (or you could use overflow:hidden instead which wil clear floats also in mozilla.) Or use another non structural clearing method instead(see faq on floats).

    I'd need to know exactly what you were planning and why you felt it necessary to add the overflow anyway


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
  •