Dkleinen Posted April 9, 2010 Report Share Posted April 9, 2010 I've just written a couple of simple websites with just HTML and I've noticed that the browsers stretch the content to fill the widescreen monitors. This w3schools page is also stretched all the way across my big screen.How can I control the width, so the page maintains the same look that I had before widescreen monitors, which would leave blank spaces on the sides? Link to comment Share on other sites More sharing options...
real_illusions Posted April 9, 2010 Report Share Posted April 9, 2010 Use widths in pixels rather than percentages on an outer container.Instead of.outer {width:100%;}use.outer {width:900px;}for example. Link to comment Share on other sites More sharing options...
thescientist Posted April 9, 2010 Report Share Posted April 9, 2010 or, if you have no width set, but are using a div, know that a div will automatically widen to fill the width of its parent container. In which case, do like real illusions said and put a pixel width on your div, or make it a value less than 100%. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now