David.W.S
Jun 10th, 2010, 05:31 PM
Hi all!,
The site I am currently working on contains a 20px high x 980px wide strip that I am having difficulty aligning with a left hand vertical panel that is next to a photo - see attachment below to indicate what I'm talking about. The black strip at the base is supposed to align left with the left hand vertical panel, OR align right with the main image.
Any assistance regarding what I am doing wrong would be appreciated. Likewise if there is anything else contradictory, awkward or unnecessary in the coding below, then please offer your advice. Many thanks.
This is the current HTML...
<div id="wrapper">
<div id="sidebar"></div>
<div id="main_image"><img src="images/main.jpg" width="779" height="584">
<div id="bottom_strip"></div>
</div>
And this is my current CSS...
#wrapper {
margin: 0 auto;
padding-top: 25px;
width: 980px;
}
#sidebar {
float: left;
width: 186px;
height: 584px;
background: #000000;
margin-top: 5px;
}
#main_image {
margin-top: 5px;
margin-left: 201px;
width: 779px;
height: 584px;
}
#bottom_strip {
margin-top: 5px;
width: 980px;
height: 20px;
background-color: #000000;
}
The site I am currently working on contains a 20px high x 980px wide strip that I am having difficulty aligning with a left hand vertical panel that is next to a photo - see attachment below to indicate what I'm talking about. The black strip at the base is supposed to align left with the left hand vertical panel, OR align right with the main image.
Any assistance regarding what I am doing wrong would be appreciated. Likewise if there is anything else contradictory, awkward or unnecessary in the coding below, then please offer your advice. Many thanks.
This is the current HTML...
<div id="wrapper">
<div id="sidebar"></div>
<div id="main_image"><img src="images/main.jpg" width="779" height="584">
<div id="bottom_strip"></div>
</div>
And this is my current CSS...
#wrapper {
margin: 0 auto;
padding-top: 25px;
width: 980px;
}
#sidebar {
float: left;
width: 186px;
height: 584px;
background: #000000;
margin-top: 5px;
}
#main_image {
margin-top: 5px;
margin-left: 201px;
width: 779px;
height: 584px;
}
#bottom_strip {
margin-top: 5px;
width: 980px;
height: 20px;
background-color: #000000;
}