J
JoyDivision
- Original Poster
- #1
I am having a problem with this website I am working on. I have a main div, a header, a nav bar and underneath that I need two floating columns, I am trying to get them to lign up one to the left, and one to right, I have done float:left; display:inline; and it works but as soon as I use the inline propety the main div no longer uses its auto height properly which results in the main background dispearing unless I fix the height. I don't have any idea what is wrong, I have created this setup lots of times in the past and it has worked flawlessy. Here is the CSS code.
All the DIV tags in the HTML are in the right place and terminated properly.
Thanks.
All the DIV tags in the HTML are in the right place and terminated properly.
Code:
/* CSS Document */
body{
background-color:#99ccff;
}
.main{
width:1024px;
border-width:1px;
border-style:solid;
border-color:black;
margin-left:auto;
margin-right:auto;
background-color:yellow;
height:auto;
overflow:visible;
}
.header{
width:1024px;
height:auto;
background-image:url('header2.png');
background-repeat:repeat;
text-align:right;
font-family: verdana, Helvetica, Arial, Sans-Serif;
font-size:1.1em;
color:black;
background-color:#6699cc;
padding-top:20px;
padding-bottom:40px;
}
.navbar{
background-image:url('navbar.png');
background-repeat:repeat-x;
width:1024px;
height:auto;
padding-top:10px;
padding-bottom:4px;
color:white;
background-color:#000066;
text-align:center;
}
.bottomnavbar{
background-image:url('navbar2.png');
background-repeat:repeat-x;
width:1024px;
height:11px;
}
.italics{
font-style:italic;
font-family: Times-New-Roman;
font-weight:bold;
}
.content{
width:950px;
height:auto;
background-color:white;
margin-left:auto;
margin-right:auto;
}
.contentleft{
width:450px;
height:auto;
border-right-style:solid;
border-right-width:1px;
border-right-color:black;
padding-left:20px;
padding-bottom:20px;
padding-right:10px;
margin-bottom:10px;
background-color:red;
float:left;
}
.contentright{
width:150px;
padding:20px;
float:right;
background-color:red;
display:inline;
}
h1{
font-family: verdana, Helvetica, Arial, Sans-Serif;
font-size:1.4em;
}
A.navtop:link, A.navtop:visited, A.navtop:Active{
text-decoration:none;
color:white;
text-align:center;
font-family: verdana, Helvetica, Arial, Sans-Serif;
font-size:1.1em;
padding-left:10px;
padding-right:10px;
}
A.navtop:hover{
background-color:white;
color:black;
}
Thanks.