webForumDet fria alternativet

Bakgrundsbild i css-meny

2 svar · 365 visningar · startad av AnnelieT

AnnelieTMedlem sedan apr. 200553 inlägg
#1

Hej!

Jag har en CSS meny och framför varje länknamn har jag en pil(gif.fil). Problemet är att jag vill ha lite luft mellan vänsterkanten och pilen. Går det på något sätt att positionera bakgrundsbilden med ett exakt värde i css-koden?

#menu {
width: 157px;
float: left;
margin-top: 20px;
margin-left: -2px;
margin-bottom: 20px;	
padding: 0;}

#menu li{
margin-bottom: 2pt;
list-style-type: none;}

#menu a{
width: auto;
height: 100%;
text-align: left;	
background:#3a7171 url(images/arrow4.gif) no-repeat left center;} 
font-size: 11pt;
color:#fff;
display: block;
padding: 3px 0px 3px 30px;
text-decoration: none;
border: 2px solid #426060;
}

#menu a:link{color: #fff;}
#menu a:visited{color: #fff;}
#menu a:hover{background:#aecdcd url(images/arrow4.gif) no-repeat left center;}
TroxyMedlem sedan mars 20041 505 inlägg
#2
background:#3a7171 url(images/arrow4.gif) no-repeat [b]left center[/b];}

Byt ut detta till X- respektive Y-väden istället. Exempelvis:

background:#3a7171 url(images/arrow4.gif) no-repeat 10px 5px;}
AnnelieTMedlem sedan apr. 200553 inlägg
#3

Tack för tipset! Nu ser det bättre ut.

126 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
123 ms — hämta tråd, inlägg och bilagor (db)