Home >Web Front-end >HTML Tutorial >ie firefox has different width_html/css_WEB-ITnose
c9ccee2e6ea535a969eb3f532ad9fe89
.top{width:1100px;height:90px;border:1px solid #000;margin:0px auto;}
531ac245ce3e4fe3d50054a55f265927
80f9b663bb54be620d7beb5492c730d2
ff6d136ddc5fdfeffaf53ff6ee95f185
25edfb22a4f469ecb59f1190150159c61bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c62bed06894275b65c1ab86501b08a632eb
25edfb22a4f469ecb59f1190150159c63f271e2f0188db4f19726b6c66af378b0
16b28748ea4df4d9c2150843fecfba68
firefox is obviously narrow
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> .top{width:1100px;height:90px;border:1px solid #000;margin:0px auto;} </style> </head> <body> <div class="top"> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </body></html>
Still the same narrow screen
Is it wide screen?
Define width as % and it will be ok
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> .top{width:96%;height:90px;border:1px solid #000;margin:0px auto;} </style> </head> <body> <div class="top"> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </body></html>
The poster checked to see if the wanderer was accidentally enlarged and adjusted it to 100%
% is the same width
My computer screen is widescreen
But wouldn’t it work without using %?
I don’t understand what effect the poster wants to achieve?
I don’t understand what effect the poster wants to achieve?
What I mean is that my top code can make it display the same width in both browsers
That is % or fixed px
Even if the px width is fixed, it will be different
I use IE6, 7, 8 Chrome, Safari, Opera, and Firefox all have the same width. . .
Is there something wrong with my firefox? ?
Try reinstalling