PDA

View Full Version : What's wrong with this code?



Meti
21-07-2008, 04:14 PM
Hey,
I'm currently coding a layout for one of my customers. It's like 99% done, but I'm having a problem. The navigation isn't in centered, which it should be.
Here's the code. Please help me ;)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="sv">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index1</title>
<style type="text/css">
<!--
body {
background-image: url(images/bg.png);
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
margin: auto;
}
#container {
width: 956px;
margin: auto;
}
#banner {
background-image:url(images/banner3.png);
width: 593px;
height: 126px;
padding-left: 0px;
padding-top: 14px;
}
#navigation {
background-image: url(images/header2.png);
width: 851px;
height: 61px;
}
#leftcont {
width: 209px;
float: left;
}
#blue_box {
background-image: url(images/add_1.png);
width: 209px;
height: 20px;
padding-top: 10px;
}
#footer {
background-image: url(images/footer_bot.png);
width: 209px;
height: 20px;
-->
</style></head>
<body>
<!-- Layout designed and coded by MetiDesigns.com -->
<!-- Start banner and navigation -->
<div id="container">
<div id="banner" style="width: 968px; height: 126px" align="left"><br>
<a href="http://vivhosting.net">
<img border="0" src="images/logo.png" width="431" height="91"></a></div>
<div id="navigation" style="width: 853px; height: 57px" align="center">
<br>
<font face="Arial"><br>
</font><font color="#FFFFFF" face="Verdana" size="3"><b>LINK | LINK | LINK |
LINK | LINK | LINK | LINK | LINK | LINK | LINK </b></font></div>
<!-- End banner and navigation -->
<!-- Start left column -->
<div id="leftcont">
<div id="blue_box" style="width: 209px; height: 157px"><center><br>
<font color="#FFFFFF"><b>Hosting Package Description</b><br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT</font></center></div>
<div id="blue_box" style="width: 209px; height: 162px"><center>
<font color="#FFFFFF"><b><br>
Hosting Package Description</b><br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT<br>
TEXT</font></center></div>
<div id="footer" style="width: 998px; height: 34px"><center>
<font color="#FFFFFF"><br>
<b>Copyright © CustomersSite.net 2008+&nbsp;&nbsp; |All your links here |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Layout designed and coded by MetiDesigns.com</b></font><br></center></div>
</div>
</body>
</html>

e5
21-07-2008, 04:16 PM
wouldn't you just do <center> </center> on the navigation bit?

Meti
21-07-2008, 04:27 PM
I tried :S
It wont work.
------
EDIT: I think i fixed it :)

Roosteria
21-07-2008, 04:29 PM
No because it isn't valid XHTML.

Try:

Margin: 0px; in your nav container. :P

Meti
21-07-2008, 04:44 PM
Sorry for double post, but new information...

I've messed it all up, worse than it was :(

EDIT: But, if you are a good coder as I am, you'll know how to fix it :P Problem solved.


THREAD "CLOSED"

Mounta1nGoat
21-07-2008, 04:47 PM
"<div id="navigation" style="width: 853px; height: 57px" align="center">"
That aligns text. You will have to find another way to align it, maybe percentages?

Roosteria
21-07-2008, 04:53 PM
"<div id="navigation" style="width: 853px; height: 57px" align="center">"
That aligns text. You will have to find another way to align it, maybe percentages?


No you spack, he has to do it in CSS. :P

Roosteria
21-07-2008, 05:02 PM
"<div id="navigation" style="width: 853px; height: 57px" align="center">"
That aligns text. You will have to find another way to align it, maybe percentages?


No, he'd do in CSS for it to be valid.

Meti
21-07-2008, 05:05 PM
I tried <center> </center> again :P

Want to hide these adverts? Register an account for free!