css - Using image as generic link background -


how can have image background links? want have nice box representing buttons, cannot figure out.

i have tried:

a {      font-size: 40px;     background: url('images/shooting-stars/shooting-star-link.png') no-repeat left top;  } 

but not working, image not displaying.

"i want have nice box representing buttons, cannot figure out." - don't understand part.

anyway, css looks fine here, sure image exists? working example exact same code, image i'm sure exists:

http://jsfiddle.net/3k9nm/

if want show image, if text shorter, should set minimum width links. mean they'll have inline-blocks, can't set width on regular link (which inline element).

a {   display: inline-block;   min-width: 25px;   } 

(25px randomly chosen, fill in width of background image..)


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -