Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i saw this on a website, and looked a bit through the css, but coudn't quite find what I am looking for. How to make a html element let's say a <div> with width of eg. 3000px but make so that page doesen't put up scrollers automaticlly so that you can scroll to the right most and see the end of that content. But if the page is resized to let's say resolution smaller then 800x600, scrollbars appear (becouse the MAIN content is bigger than that), but they only let you scroll and see the MAIN content, not the right most part of the said <div>.
So basically, how to a browser ignore an elemets width or height no matter how big or sall it is?

share|improve this question

You apply the sizes for the div using CSS styles. You can do them inline or in a stylesheet document (recommonended)

Its hard to do a proper design that reaches all monitor widths. You see this for admin interfaces, or online maps, but most popualr websites have around a 960px width.

An approach you can do with CSS is: min-width:600px, max-widht:1200px;. This will make a div that has to be at least 600px fat and wont get fatter than 1200px. The problem is if a website gets too fat, and someone opens it up on a 1920x1200 screeen or 2560x1600 screen then the website looks really funny.

In anycase, be careful with this type of design. Usually the width of this web page is the best choice .

share|improve this answer

found it... i anyone else has the same problem, the solution is min-width and min-height...

share|improve this answer
min-width and min-height are not compatible in every browser. Older ones like IE6 disregard these so you'll want to set a height and width specifically for them. – XOPJ Oct 20 '10 at 16:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.