...

View Full Version : how can i assign this code to more than one image



juxmedia
10-10-2007, 02:57 PM
i have this code which is a roll over code for an image but i have 4 differnt images so need the code for all four is there anyway i can aply it to all of them bye assigning a dif id just so the code isnt copyed over and over

#cssnav
{
position: relative;
font-family: arial, helvetica, sans-serif;
background-image:url(webroll.png);
white-space: nowrap;
display: block;
width: 211px;
height: 94px;
margin: 0;
padding: 0;
background-repeat: no-repeat;
}

#cssnav a
{
display: block;
color: #000000;
font-size: 11px;
width: 211px;
height: 134px;
display: block;
float: left;
color: black;
text-decoration: none;
}

#cssnav img
{
width: 190px;
height: 120px;
border: 0
}

#html a:hover
{
visibility:visible
}

#cssnav a:hover img
{
visibility:hidden
}

#cssnav span
{
position: absolute;
left: 35px;
top: 15px;
margin: 0px;
padding: 0px;
cursor: pointer;
width: 124px;
}

BarrMan
10-10-2007, 03:11 PM
Yes. You could use a class instead of an ID. You can define a class like an ID just use instaed of #, a dot.

.This_is_a_class
{
}
#This_is_an_ID
{
}

And then add to all the images you'd like to use these properties:

<img class="This_is_a_class" />



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum