CSS Image question

Permabanned
Joined
4 Nov 2007
Posts
180
Hi all,

I am having a few problems with trying to get this to work:

I need a banner for a website, I want it to adjust to a width of 70% across the screen but keep a depth of 175px down the screen.

The image is a banner of size 800 x 175px.

Is there anyway I can make it fit into the div and stretch outwards to make it always fit inside without making it expand downwards?

Or am I better off making the 175px a % measurement?
 
You can use "em" as a unit measurement for the width which makes it fluid.

Only problem you'll have is that the image will stretch and look cack when the screen resolutions get big.

You can use something like

width: 60em;
height: 175px;

I'm sure you'll have to make the main body width an 'em' value too.
 
Back
Top Bottom