Click to See Complete Forum and Search --> : Page Width


Drew06
02-17-2006, 03:47 PM
Was wondering what html or css code would be needed to set my entire page's width to 800px. That way 95% of maximised screens could see it correctly if I used pixel widths on divs and such.

/* CSS Document */
body
{
background-color: #000;
color: #FFF;
cursor: url;
width: 100%;
height: 100%;
margin-bottom: 0
}
div#alpha
{
float: left;
width: 11%;
height: 100%;
margin: 0;
border-right: 2px solid #333;
padding: 1em;
}
div#beta
{
float: left;
height: 100%;
width: 79%;
margin: 0;
padding: 1em;
text-align: center
}
div#footer
{
float: left;
width: 100%;
vertical-align: bottom;
margin: 0;
text-align:center
}
hr#grey
{
color: #333;
width: 100%;
height: 2px;
margin-bottom: 0px
}
img#deathleft
{
margin-right: 1px
}
img#middle
{
margin-right, margin-left: 1px
}
img#deathright
{
margin-left: 1px
}

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Homepage</title>
<link rel="stylesheet" type="text/css" href="2colayout.css">
</head>
<body>
<center>
<table>
<tr>
<td width="160px">
<img id="deathleft" src="http://i20.photobucket.com/albums/b229/Graveking92/Clan/death.gif" />
</td>
<td width="494px">
<img id="middle" src="http://i20.photobucket.com/albums/b229/Graveking92/Clan/elderlogo.gif" />
</td>
<td width="160px">
<img id="deathright" src="http://i20.photobucket.com/albums/b229/Graveking92/Clan/death.gif" />
</td>
</tr>
</table>
<hr id="grey" />
</center>
<div id="alpha">
<p>Homepage</p>
<p>Forums</p>
<p>About Us</p>
<p>Contact Us</p>
<p>Links</p>
</div>
<div id="beta">
<h2>Welcome!</h2>
<h4>Latest News:</h4>
<p>2/14/06: Website Construction Started</p>
</div>
<div id="footer">
<p><font size="-2">Copyright © 2005. All Rights Reserved. Elder Gaming.</font></p>
</div>
</body>
</html>

Elder Gaming (http://www.geocities.com/eldergaming/index.htm)

Drew06
02-17-2006, 11:09 PM
anyone know?

ray326
02-18-2006, 12:01 AM
Have you tried using width:800px in your body style?

Drew06
02-18-2006, 12:21 AM
yeah it dont work

ray326
02-18-2006, 12:35 AM
OBTW, dimensions aren't valid here -- <td width="160px">

bajanboost
02-18-2006, 01:09 AM
Your entire page's width you ask?

<table width=800>
<tr>
<td>


Paste Your Code in here....

</td>
</tr>
</table>

pcthug
02-18-2006, 01:49 AM
Or Better Yet:
<div width="800px">

Paste Your Code in here....

</div>

welsh
02-18-2006, 10:24 AM
pcthugs way would be the better of the two choices.

Drew06
02-18-2006, 01:39 PM
do i paste the entire head and body code in there, or just the stuff inside the body

felgall
02-18-2006, 02:44 PM
Of course the page will be totally screwed in Web TV as that has a fixed width of 544px built in. Mobile phone users will also have trouble reading your page at that width.

welsh
02-18-2006, 03:02 PM
to get the whole site to be 800px wide stick: <div width="800px"> at the very top just under the body tag and then: </div> just above the closing body tag.