I have re-written the css and html twice now and I am out of ideas and googling results, anyone able to see the error in my code? The wrapper will not align the website in the center. Very grateful for any insight into the problem. -
-
body {
-
font-family: "Times New Roman", Times, serif;
-
font-size: 1em;
-
text-align:center;
-
}
-
-
-
h1 {
-
font: bold 2em Lucida Console, Times, serif;
-
}
-
h2 {
-
font: bold 1.5em "Times New Roman", Times, serif;
-
}
-
h3 {
-
font: bold 1.2em Arial, Geneva, Helvetica, sans-serif;
-
}
-
-
-
}
-
#wrapper {
-
text-align:left;
-
width: 900px;
-
margin-left: auto;
-
margin-right: auto;
-
}
-
-
#mainhead {
-
text-align: center;
-
width: 900px;
-
}
-
-
-
#navi {
-
float: left;
-
width: 148px;
-
margin-top:10px;
-
margin-bottom: 10px;
-
-
}
-
-
.navibox {
-
-
width:148px;
-
height: 25px;
-
background-image:url(naviboximg.jpg);
-
margin-bottom: 2px;
-
}
-
-
#content {
-
float: left;
-
width: 718px;
-
margin-top: 10px;
-
margin-bottom: 10px;
-
margin-left: 10px;
-
padding: 10px;
-
-
}
-
-
#footer {
-
text-align: center;
-
/*clear: both;*/
-
width: 898px;
-
}
-
-
a:link {
-
color :#FEF47E;
-
}
-
-
a:visited {
-
color: #FEF47E;
-
}
-
-
a:hover {
-
color: #FEF47E;
-
}
-
-
a:active {
-
color: #FEF47E;
-
}
-
-
<html>
-
-
<link href="cssstyle.css" rel="stylesheet" type="text/css" />
-
-
<head>
-
</head>
-
<body>
-
-
<div id="wrapper">
-
-
<div id="mainhead">
-
-
<h1>Title</h1>
-
<h2>sub-heading</h2>
-
-
</div>
-
-
<div id="navi">
-
<div class="navibox">
-
</div>
-
<div class="navibox">
-
</div>
-
<div class="navibox">
-
</div>
-
<div class="navibox">
-
</div>
-
</div>
-
-
<div id="content">
-
<br />
-
<p> blah blah blah </p>
-
<br />
-
</div>
-
-
<div id="footer">
-
<p> blah blah </p>
-
</div>
-
-
-
-
-
</div>
-
-
</body>
-
-
</html>
-
1 1463
Line #20 in your CSS you have an extra } .
You should be declaring a doctype in your html as well. Other than that everything looks okay to me.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bryan R. Meyer |
last post by:
Hello Everyone,
I've been working with CSS trying to understand it and incorporate it
into a revised version of my web page. I've noticed a few problems
which perhaps someone could shed some...
|
by: Alan |
last post by:
Hi All,
I am trying to make a few calls in succession to a website to allow me to
login and then perform a search, in a c# windows program.
wcResponse =...
|
by: Harris Kosmidhs |
last post by:
Hello.
sorry if this has been answered previously. I use a main wrapper div to
put the whole site in it. And I use
margin: 0 auto 0 auto
in order to center the page. But in IE it fails. Is...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |