Is there a pure css way of setting your div width to the width of the background image you are using for that div?
for instance right now I'm doing this...
#homeNav{
background-image:url(../images/navPieces/home.jpg);
width:165px;
text-align:right;
}
#aboutNav{
background-image:url(../images/navPieces/about.jpg);
width:81px;
text-align:center;
}
#competitorsNav{
background-image:url(../images/navPieces/competitors.jpg);
width:117px;
text-align:center;
}
I'd love to NOT have to write in the width of every div.
Any suggestions?