Home > Web Front-end > HTML Tutorial > ie firefox has different width_html/css_WEB-ITnose

ie firefox has different width_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:11:38
Original
984 people have browsed it


< div class="top">


  • 1

  • 2

  • 3



firefox is obviously narrow


Reply to discussion (solution)

<!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>
Copy after login



Let me try it, why is it so narrow?

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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template