Jump to content

using CSS to have same image bg but diff sizes?


jacko_162

Recommended Posts

I have a post tag image which is a set width, how can i use this image with css to have differnt widths using the same image?

 

i have attached what the tag looks like with different sized text.

 

any help on the matter would be appreciated. this is my first FULL .css managed site and i get so confused.

 

 

 

[attachment deleted by admin]

I recommend you have a look in something called the sliding doors technique.

in a nutshell it uses 1 very stretched image as a sprite

and 1 nested html element. for instance:

 

<a href=""><span>link text</span></a>

 

Al you need to do now is set the same background for both the a-element and the span, but with a different background position and one the text of the span increases the image is working as if it were a sliding door.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.