mlissner
7th December 06, 11:34 PM
Hello, I have a fairly simple question, I think.
I'm trying to create a static three column website where the middle column is about 800 pixels wide. I've made a navigation bar that sits in this column, but I am encountering trouble when I adjust the size of the font on the page. Whenever I make it too big, the navigation bar starts showing up on two lines, and looks dreadful.
Does anybody have any ideas on how to fix this? Here's my css:
<style type="text/css">
/*******************/
/*Global Attributes*/
/*******************/
* {
margin: 0;
padding: 0;
}
html, body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.166;
height: 100%;
background-color: white;
}
img{
border: none;
}
/***********************/
/*Formatting Attributes*/
/***********************/
#container {
width: 780px;
margin: auto;
background: #006600;
}
#content{
clear: left;
padding: 16px;
background-color: #ECF9F8;
border-left: 1px solid gray;
border-right: 1px solid gray;
border-bottom: 1px solid gray;
}
#footer{
background-color: white;
}
/*******************/
/*Navbar Attdibutes*/
/*******************/
#cssdropdown, #cssdropdown ul {
padding: 0;
margin: auto;
list-style: none;
}
#cssdropdown li {
float: left;
position: relative;
}
.mainitems{
border: 1px solid white;
background-color: #006600;
border-bottom: none;
border-left: none;
border-top: none;
font-weight: bold;
padding-top: none;
}
.mainitems a{
white-space: nowrap;
margin-left: 6px;
margin-right: 8px;
text-decoration: none;
color: white;
line-height: 2;
}
/*This and ".mainitemsright a" need to be used on the rightmost li*/
.mainitemsright{
white-space: nowrap;
border: none;
background-color: #006600;
font-weight: bold;
padding-top: 0px;
}
/*To be used with .mainitemsright to fix up the border issues*/
.mainitemsright a{
margin-left: 6px;
margin-right: 8px;
text-decoration: none;
color: white;
line-height: 2;
}
.subuls{
display: none;
width: 10em;
position: absolute;
top: 2em;
left: 0;
background-color: #009900;
border: 1px solid white;
z-index: 1;
}
.subuls li{
width: 100%;
border-bottom: 1px solid white;
}
#cssdropdown li>ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
top: auto;
left: auto;
}
#cssdropdown li:hover ul, li.over ul { /* lists nested under hovered list items */
display: block;
}
/********************/
/*Content Attributes*/
/********************/
#content a:link, #content a:visited, #content a:hover{
color: #006699;
text-decoration: none;
}
/* overrides decoration from previous rule for hovered links */
#content a:hover {
text-decoration: underline;
}
#content p {
font-size: 80%;
margin-top: 15px;
}
ul.h1 {
list-style-position: inside;
list-style-image: url(assets/images/bullet.jpg);
padding: 4px;
font-size: 140%;
color: red;
}
/*******************/
/*Footer Attributes*/
/*******************/
#footer a:link, #footer a:visited, #footer a:hover{
color: #006699;
text-decoration: none;
font-weight: bold;
margin-left: 1em;
margin-right: 1em;
font-size: 80%;
}
/* overrides decoration from previous rule for hovered links */
#footer a:hover {
text-decoration: underline;
font-weight: bold;
font-size: 80%;
}
#footer p {
font-size: 80%;
margin-left: 1em;
margin-right: 1em;
}
</style>
Thanks in advance. This is really putting a stop to my best efforts. If I could simply specify a specific font-size that would be the same on all browsers, that would fix this problem...thanks...
I'm trying to create a static three column website where the middle column is about 800 pixels wide. I've made a navigation bar that sits in this column, but I am encountering trouble when I adjust the size of the font on the page. Whenever I make it too big, the navigation bar starts showing up on two lines, and looks dreadful.
Does anybody have any ideas on how to fix this? Here's my css:
<style type="text/css">
/*******************/
/*Global Attributes*/
/*******************/
* {
margin: 0;
padding: 0;
}
html, body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.166;
height: 100%;
background-color: white;
}
img{
border: none;
}
/***********************/
/*Formatting Attributes*/
/***********************/
#container {
width: 780px;
margin: auto;
background: #006600;
}
#content{
clear: left;
padding: 16px;
background-color: #ECF9F8;
border-left: 1px solid gray;
border-right: 1px solid gray;
border-bottom: 1px solid gray;
}
#footer{
background-color: white;
}
/*******************/
/*Navbar Attdibutes*/
/*******************/
#cssdropdown, #cssdropdown ul {
padding: 0;
margin: auto;
list-style: none;
}
#cssdropdown li {
float: left;
position: relative;
}
.mainitems{
border: 1px solid white;
background-color: #006600;
border-bottom: none;
border-left: none;
border-top: none;
font-weight: bold;
padding-top: none;
}
.mainitems a{
white-space: nowrap;
margin-left: 6px;
margin-right: 8px;
text-decoration: none;
color: white;
line-height: 2;
}
/*This and ".mainitemsright a" need to be used on the rightmost li*/
.mainitemsright{
white-space: nowrap;
border: none;
background-color: #006600;
font-weight: bold;
padding-top: 0px;
}
/*To be used with .mainitemsright to fix up the border issues*/
.mainitemsright a{
margin-left: 6px;
margin-right: 8px;
text-decoration: none;
color: white;
line-height: 2;
}
.subuls{
display: none;
width: 10em;
position: absolute;
top: 2em;
left: 0;
background-color: #009900;
border: 1px solid white;
z-index: 1;
}
.subuls li{
width: 100%;
border-bottom: 1px solid white;
}
#cssdropdown li>ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
top: auto;
left: auto;
}
#cssdropdown li:hover ul, li.over ul { /* lists nested under hovered list items */
display: block;
}
/********************/
/*Content Attributes*/
/********************/
#content a:link, #content a:visited, #content a:hover{
color: #006699;
text-decoration: none;
}
/* overrides decoration from previous rule for hovered links */
#content a:hover {
text-decoration: underline;
}
#content p {
font-size: 80%;
margin-top: 15px;
}
ul.h1 {
list-style-position: inside;
list-style-image: url(assets/images/bullet.jpg);
padding: 4px;
font-size: 140%;
color: red;
}
/*******************/
/*Footer Attributes*/
/*******************/
#footer a:link, #footer a:visited, #footer a:hover{
color: #006699;
text-decoration: none;
font-weight: bold;
margin-left: 1em;
margin-right: 1em;
font-size: 80%;
}
/* overrides decoration from previous rule for hovered links */
#footer a:hover {
text-decoration: underline;
font-weight: bold;
font-size: 80%;
}
#footer p {
font-size: 80%;
margin-left: 1em;
margin-right: 1em;
}
</style>
Thanks in advance. This is really putting a stop to my best efforts. If I could simply specify a specific font-size that would be the same on all browsers, that would fix this problem...thanks...