CSS Image Align Help Please
Page 1 of 12 Replies - 337 Views - Last Post: 24 January 2013 - 06:01 PM
#1
CSS Image Align Help Please
Posted 24 January 2013 - 05:33 PM
Hello, I would really appreciate some help with my CSS coding. I am new at this
Could someone please review www.byedui.com/inner.html I am trying to move the image of the cop and firetrucks up so it matches the top of the rounded corner div item. Could someone point me in the right direction to ensure that the image aligns exactly with the top of the div item? Thanks so much!! Cheers
Replies To: CSS Image Align Help Please
#2
Re: CSS Image Align Help Please
Posted 24 January 2013 - 06:00 PM
The problem is more to do with your HTML than your CSS, though the whole thing is a bit of a mess.
Remove the <img> element altogether, and add the image as a background to the main div, like so:
Remove the <img> element altogether, and add the image as a background to the main div, like so:
<div align="center" id="content-container">
<div style="width:960px;height:280px; align:right;-webkit-border-radius: 12px;-moz-border-radius: 12px;border-radius: 12px;border:1px solid #004468;background:rgba(209,209,209,0.6);background:url('images/bannere.jpg') no-repeat right;-webkit-box-shadow: #D1D1D1 2px 2px 2px;">
#3
Re: CSS Image Align Help Please
Posted 24 January 2013 - 06:01 PM
You have a <div align="right"> before the image that has a height of 15px and is pushing the image down. Remove this. (I'm not sure why you need these divs any way.)
Also, the image itself is contained in a div which has no height. You are suffering from divitis!
Also, the image itself is contained in a div which has no height. You are suffering from divitis!
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote



|