New <div> driving me nuts!
Posted: Wed 06 Jun 2012 6:53 pm
I wanted to create a new div in the top right of my header to contain a flag image but when I place the new div in the header either the new div "UK_flag" or existing "right_header" align to the right but not both. It's as though one is in the way of the other. I've given them both black backgrounds so it's easy to see where they are.
I already have two div's to the left of the header that behave.
How do I get both div's to align right?
header test
and the CSS.
Header:
I do have the flag image showing on my "working site" but I have included the image in the "right_header" div which is not what I wanted to do.
Duke
I already have two div's to the left of the header that behave.
How do I get both div's to align right?
header test
and the CSS.
Code: Select all
#header {background:#2EB1DB; border:3px solid #000000; width:1044px; height:155px; border-radius:25px;}
#left_header { float:left; padding:20px; margin-top:20px; color:#ffffff; font-size:55px; text-shadow:1px 1px 5px #000000;}
#location {float:left; padding:0px 0px 0px 20px; text-align:left; font-size:15px; color:#000000; text-shadow:1px 1px 3px #ffffff;}
#uk_flag {background: #000; float:right; padding:5px; margin-top:5px; text-align:right;}
#right_header {background: #000; float:right; padding:5px; margin-top:95px; color:#ffffff; font-size:20px; text-align:right; text-shadow:1px 1px 4px #000000;}Code: Select all
<div id="header">
<div id="left_header"><strong>Nightingale Weather.</strong></div>
<div id="uk_flag"><img alt="UK Flag" src="images2/UK-flag.gif"/></div>
<div id="right_header"><strong>Weather from Eastleigh,<br>
Live on the web.</strong></div>
<div id="location"><strong>Latitude: N 50° 57' 58" - Longitude: W 01° 22' 51" - Altitude: 26 meters.</strong></div>
</div> Duke