How to set the background image width using CSS? -


i need set fixed width background image. should work fine in both ie , firefox. how ?

@multiplexer: can't set width/height of background image, can set width/height of container.

e.g.

<div style="background: url(someimage.jpg) no-repeat 0 0; height: 300px; width: 400px">   content </div> 

if someimage.jpg 640x480, 400px of width , 300px of height shown. can move background around playing background position properties of css -- see http://www.w3schools.com/css/css_background.asp full/short-hand reference.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -