freshgear
07-21-2003, 05:14 AM
ok intead of using img src= for a css style sheet is there another way to put an image in a style sheet be sides the basic code
if this is a dum question sorry
if this is a dum question sorry
|
View Full Version : css images freshgear 07-21-2003, 05:14 AM ok intead of using img src= for a css style sheet is there another way to put an image in a style sheet be sides the basic code if this is a dum question sorry Alcy 07-21-2003, 05:16 AM ... Do you mean using an image for a background? <style type="text/css"> body { background-image:url(IMAGE.GIF); background-repeat:no-repeat; } </style> freshgear 07-21-2003, 05:18 AM kind of but i dont want it as a background just a basic simple image but i dont no the code for it to put on a css style sheet Alcy 07-21-2003, 05:22 AM Oh, you want to add an image with stylesheet? I'm pretty sure it would have to be a background... you could use classes: <style type="text/css"> .IMAGE1 { background-image:url(IMAGE1.GIF); background-repeat:no-repeat; width:#px; height:#px; .IMAGE2 { background-image:url(IMAGE1.GIF); background-repeat:no-repeat; width:#px; height:#px; </style> <div class="IMAGE1"> </div> <div class="IMAGE2"> </div> Why wouldn't you want to use <img src=""> freshgear 07-21-2003, 05:25 AM oh i usualy use <img src=> but i wanted to try something with style sheets and i need that code you gave me thanks alot |