Forum Moderators: not2easy

Message Too Old, No Replies

Sizing image to fit header division

I need to fit my image into my header with cross compatibility

         

newbie

11:40 pm on Jun 18, 2008 (gmt 0)

10+ Year Member


I have had image issues on three (not-so-beautiful) websites that I have authored and need to know if there is a hard and fast rule for fitting an image into a header space that floats (if that makes sense). the body of the page is fixed and the header floats above. the problem is that I am trying to have the image size absolute but run into issues between browsers. Is there a way to have it automatically size for the browser?

this is the code that I have for it:

background: #D4C7B2 url(../images/img_98.gif) repeat-x top left

Thanks in advance

penders

9:47 am on Jun 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you are setting the image as a CSS background then you can't explicity change the size of the image, just the size of the container it is in - which I guess you will want to be at least the size of the background image. Bear in mind that the value of the width/height properties you set excludes padding, margins and borders (the box model [w3.org]). You will need to make sure you have a strict or transitional DOCTYPE for the box model to be consistent cross-browser.