-
Stupid, simple problem with formatting
I’m having this problem with the formatting of DIVs in a website that I;’m working on. I have a DIV on the left that’s the navigation bar with the buttons inside of it and to the far right I have a decorative bar with a halftone fade pattern The problem lies with the middle DIV that contains the text. I have that one as “middle_container” with the container that holds the text, “middle_text” inside of that. What’s happening is that when I put the text in that text DIV, it pushes the “right_gradient” DIV lower as you can see from my screenshot. The top of that gradient piece should line up with the bottom of the banner at the top without the white space in between. I have all of the DIVs set as “inline” and I’ve messed around with some other CSS properties to try to fix this thing, but I really feel like I’m shooting in the dark. What then are the CSS properties that these DIVs need to have or what kind of additional DIV might I need in the layout to straighten this out? Thanks in advance… this is going to be a huge help for me and hopefully a learning experience as well.
Below is the HTML code for that part of the page:
Here is the CSS code for those DIVs:#container {
width: 921px;
height: 898px;
margin-left: auto;
margin-right: auto;
margin-top: 2.5em;
color: #ffffff;
background-position: left top;
background-color: #FFF;
}#header {
width: 100%;
height: 245px;
background-image: url(../images/lavaun_header.jpg);
}#right_gradient {
width: 147px;
height: 653px;
background-image: url(../images/right_side_gradient.jpg);
background-color: #FFF;
background-repeat: no-repeat;
float: right;
display: inline;
position: relative;
}#nav_bar {
width: 208px;
height: 653px;
background-color: e9d6ad;
float: Left;
display: inline;
position: relative;
}.middle_container {
width: 566px;
height: 589px;
display: inline;
position: relative;
}middle_text {
width: 100%;
display: inline;
position: absolute;
height: auto;
}
