View Full Version : Centering table in Dreamweaver
ozzie123
10-31-2007, 12:08 AM
I'm trying to center a table in Dreamweaver and can get it to centre horizontally but not vertically. Vertically, it remains at the top of the browser window and I can't seem to figure out how to make it center in both directions. I'm trying to accomplish something like this site http://www.keirsurgical.com/ where the table is centered in both height and width regardless of screen size. I'm using Dreamweaver CS3.
Thanks in advance.
boogyman
10-31-2007, 04:05 AM
i think what you are talking about is the little background gray over the links?
that isnt centering, that is padding around the elements.
<ul id="nav">
<li><a href="/url/path">Link</a></li>
<li><a href="/url/path">Link</a></li>
<li><a href="/url/path">Link</a></li>
<li><a href="/url/path">Link</a></li>
<li><a href="/url/path">Link</a></li>
</ul>
<style type="text/css">
ul#nav {
width: 100%;
}
ul#nav li {
list-style: none;
display: inline;
background-color: #hexadecimal; /* eg#ffffff for white */
color: #hexadecimal /* text color */
}
ul#nav li a {
display: block;
color: inherit;
text-decoration: none;
}
ul#nav li a:hover {
background-color: #hexadecimal; /* change the color of background on hover */
text-decoration: underline;
}
</style>
ozzie123
10-31-2007, 01:08 PM
Thanks Boogeyman but I'm actually looking to center my entire website onscreen. Most websites are centered but located at the top of the browser window but this one (and a few others I've seen) are actually completely centered within the browser window - no matter how the window is sized. So, the screen space around the webpages is equal all the way around. I have a 21" monitor so when I preview my site, it is fine horizontally within the browser window but vertically, it stays at the top of the window and I don't know how to change that. I hope this makes sense. :) Any other ideas?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.