plasma800
06-03-2003, 11:33 AM
Hey everybody,
I'm having a bit of a strange CSS problem that I'm hoping someone might be able to help me with.
I run a kinda largish site that has a 150 px wide navigation bar on the left hand side. Standard. That navigation is held in a 150 wide td of the overall layout table. Inside that td, i used to run the nav inside of a nested table so that I could format different sections of the nav with different background colors and some css border stuff.
Recently, I redesigned, and took the nav out of the nested table and used css to create the background color and any borders (sometimes i will split nav up using a single border (top of a new block of nav) to seperate sections.
So lets say that my first bit in that TD is actually a "nav header", just some text that defines to the user what nav falls below it. (by the way, site is located at http://www.2k911.com (http://www.2k911.com ) ) So I used this bit of css code to make it centered, bold and with a grey background.
.navBlock3 {
width: 150px;
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
margin: 0px;
padding-top: 2px;
padding-bottom: 2px;
font-weight: bold;
color: #000000;
background-color: #B6B6B6;
text-align: center;
}
Now here's my big question.
In IE 6, with NO doctype at the top of the page, this works great. It's makes a box, 150 wide, text centered, grey goes allllll the way across. works fine.
Well I noticed in nutscrape, that the background color of this box would ONLY cover the actual type, not go all the way across. AND the first line of any navblock is indented....??
Now, I put a doctype (loose) in the top of the page, and when I do, IE does the same thing as netscape (as well as a few other silly things, like centering a td that should be left justified) however, I wanna figure out this css thing first.
Anyone have any ideas? This particular style was created by the wsi of Dreamweaver MX, and I would love to use css to make it instead of a table cell. Less table = less mess= less weight = better site is you ask me. Will the box css stuff work?
I'm having a bit of a strange CSS problem that I'm hoping someone might be able to help me with.
I run a kinda largish site that has a 150 px wide navigation bar on the left hand side. Standard. That navigation is held in a 150 wide td of the overall layout table. Inside that td, i used to run the nav inside of a nested table so that I could format different sections of the nav with different background colors and some css border stuff.
Recently, I redesigned, and took the nav out of the nested table and used css to create the background color and any borders (sometimes i will split nav up using a single border (top of a new block of nav) to seperate sections.
So lets say that my first bit in that TD is actually a "nav header", just some text that defines to the user what nav falls below it. (by the way, site is located at http://www.2k911.com (http://www.2k911.com ) ) So I used this bit of css code to make it centered, bold and with a grey background.
.navBlock3 {
width: 150px;
font-family: Arial, Helvetica, sans-serif;
font-size: 9pt;
margin: 0px;
padding-top: 2px;
padding-bottom: 2px;
font-weight: bold;
color: #000000;
background-color: #B6B6B6;
text-align: center;
}
Now here's my big question.
In IE 6, with NO doctype at the top of the page, this works great. It's makes a box, 150 wide, text centered, grey goes allllll the way across. works fine.
Well I noticed in nutscrape, that the background color of this box would ONLY cover the actual type, not go all the way across. AND the first line of any navblock is indented....??
Now, I put a doctype (loose) in the top of the page, and when I do, IE does the same thing as netscape (as well as a few other silly things, like centering a td that should be left justified) however, I wanna figure out this css thing first.
Anyone have any ideas? This particular style was created by the wsi of Dreamweaver MX, and I would love to use css to make it instead of a table cell. Less table = less mess= less weight = better site is you ask me. Will the box css stuff work?