CSS width 100% does not work as expected on a 22 '' monitor

Here's the HTML and CSS .

At 17 '' and 19 '' the screen looks beautiful. How could I catch the error?
Please, help.

+2


a source to share


2 answers


I'm assuming that you don't want the content area to be as wide as the entire extended browser window?

you need to give your #wrapper div a given width, then all other divs can take 100% width of it.



For instance,

#wrapper
{
    margin-left: auto;
    margin-right:auto;
    width:960px;
}

      

+2


a source


Try something like this:



<html> <body style="margin:0px;"> <div style="padding-left:50px;text-align:left;"> <div style="border:solid 1px red;width:100%;">content here</div> </div> </body> </html>

0


a source







All Articles