underline
phone number

A creative, friendly web design company based in Chelmsford, Essex

back light

Fizz Blog

Make CSS Background Image Fit Dimensions of Div

Using in-line styling, you can adjust the size of an image in your HTML code; but it often poses a problem for coders when they require a background image to be resized to fit the constraints of an existing div.

Why would you want to do this, you may ask? Well one example of usage would be when using an image as a send button perhaps or more likely these days – when using responsive design where your div will respond to the size of the user’s browser (desktop, iPhone, Android, Tablet, iPad etc etc).

make background image fit div with css

Read the rest of this entry »

Share this..
Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInPin on PinterestEmail this to someoneShare on TumblrShare on StumbleUponShare on Reddit

Tags: , , , , , , , ,