Jul
03

Why horizontal scrollbar?

Web designers  
Off

You think your html and css looking good and then you notice – a horizontal scrollbar when the site should not need to scroll!

Reasons for a scrollbar

They all come down to the same thing – the browser thinks it needs a bit more space…… Some situations that may trigger this perception or actual need:

  • 100% width, plus some padding makes it more than 100%!
  • 100% width, plus Italics : IE has to make it just that bit wider for the italics, perhaps forcing a horizontal scrollbar.
  • <pre> preformatted code that is wider than it’s containing element.

Using overflow just hides the problem

A number of sites will advise using the overflow property to get rid of it. That may well bandaid it and admittedly it is a quick fix.

Be Sociable, Share!

Related posts:

  1. CSS for horizontal tab menus I am having some fun (not!) in finalising some clean elegant css examples for my tab menu widget. I’m fussy...
Categories : Web designers

WP Questions

Preferred Web Host

Web hosting by ICDSoft Icdsoft - Why? They are good and reasonable, used them since 2001. Read more