Gunnar Bittersmann: SRC von <IMG> für Klasse fix definieren

Beitrag lesen

Hello out there!

<ul>
  <li style="background:url(bullet1.gif) 5px no-repeat;list-style:none;padding:0 0 0 20px">Home</li>
  <li style="background:url(bullet1.gif) 5px no-repeat;list-style:none;padding:0 0 0 20px">Fotos</li>
</ul>

Styleangaben inline in 'style'-Attributen sind Unfug. Und wenn für mehrere Elemente desselben Typs dieselben Angaben gemacht werden sollen, dann sind sie grober Unfug.

Richtig[tm] sähe das Beispiel so aus:

HTML:

<ul>  
  <li>Home</li>  
  <li>Fotos</li>  
</ul>

CSS:

li {  
  background:url(bullet1.gif) 5px no-repeat;  
  list-style:none;  
  padding:0 0 0 20px;  
}

See ya up the road,
Gunnar

--
“Remember, in the end, nobody wins unless everybody wins.” (Bruce Springsteen)