PDA

View Full Version : why my container display different of size from different computer?



kamkam
Jul 11th, 2010, 11:52 AM
Hi;
why my container display different of size from different computer?
In my computer, i can see the whole container(even i use different browser), but in some computer, just can see the part of the container, could anyone can help me, please.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
<style type="text/css">
html head{
border:0;
padding:0;
margin:0;

}
body{
padding:0;
border:0;
margin:0;
background-color:#CCCCCC;
}

#container {
position: relative;
width:1200px;
height:750px;
border:0;
padding: 0;
margin-top:40px;
margin-bottom:auto;
margin-left:auto;
margin-right:auto;
background-color:#FFFFFF;
}
</style>
</head>
<body>

<div id="container">
The new Prime Minister's personal support is still firming though.

Polling of 1500 people by Auspoll early last week showed she has a 45 per cent approval rating, an 18 per cent disapproval rating and a whopping 37 per cent have reserved their judgment.

The polling was taken before the asylum issue blew up in the Government's face.

Labor's election planning has been brought forward by the rise of Ms Gillard as leader.

A senior Labor source confirmed last week that former prime minister Kevin Rudd had been planning a late election, which was expected in about October.

Among a series of announcements last week that have been widely interpreted as a clearing of the decks was a decision to axe the Green Loans program and put the Government's controversial internet filter on hold for a year.

Even on social issues Ms Gillard appears to be travelling well. Her much publicised early admission that she does not believe in God is not troubling many voters.

The Auspoll survey found that having an atheist Prime Minister was of no consequence to 62 per cent of people, 20 per cent said they actively support a PM who does not believe in God while less than 18 per cent were opposed.


</div>

</body>
</html>

SB65
Jul 11th, 2010, 02:35 PM
Probably because your #container is set at 1200px wide, and you're viewing it on some computers at 1024/768, so it won't fit on the page.

kamkam
Jul 12th, 2010, 11:28 AM
so i have to set the value less than 1024*768 ?
is it the only way i can do ?

SB65
Jul 12th, 2010, 11:53 AM
You can set the width as a percentage rather than an absolute value - then #container will expand or contract depending on the screen width. This can make things a bit more complicated depending on your content, but on your current markup should be no problem.

Have a look here (http://css-tricks.com/the-perfect-fluid-width-layout/) or Google css fluid layouts.

kamkam
Jul 12th, 2010, 01:56 PM
Thanks a lot