Forum Moderators: open
when i preview it localhost i only see the link text and all the subsequent links are floated left instead of below. there is no width and height etc... but when i look online (link below) some show proper and some dont.
the html:
<a class="linkChalets" href="#./index.php?item=chalets&id=zermatt"
onmouseover="swapImage('chalets','./images/chalet_zermatt.jpg');">Le Zermatt</a>
<a class="linkChalets" href="./index.php?item=chalets&id=lausanne"
onmouseover="swapImage('chalets','./images/chalet_lausanne.jpg');">Le Lausanne</a>
<a class="linkChalets" href="./index.php?item=chalets&id=neuchatel"
onmouseover="swapImage('chalets','./images/chalet_.jpg');">Le Neuchatel</a>
<a class="linkChalets" href="./index.php?item=chalets&id=alps"
onmouseover="swapImage('chalets','./images/chalet_alps.jpg');">Les Alps</a>
<a class="linkChalets" href="./index.php?item=chalets&id=montreux"
onmouseover="swapImage('chalets','./images/chalet_montreux.jpg');">Le Montreaux</a>
<a class="linkChalets" href="./index.php?item=chalets&id=zurich"
onmouseover="swapImage('chalets','./images/chalet_zurich.jpg');">Le Zurich</a>
<a class="linkChalets" href="./index.php?item=chalets&id=geneve"
onmouseover="swapImage('chalets','./images/chalet_geneve.jpg');">Le Geneve</a>
<a class="linkChalets" href="./index.php?item=chalets&id=davos"
onmouseover="swapImage('chalets','./images/chalet_davos.jpg');">Le Davos</a>
the css:
a.linkChalets:link {
display: block;
width:304px;
height:46px;
margin: 0px 0px 10px 0px;
padding: 5px 0px 00px 0px;
background-image:url(../nav/chalets_link_0.gif);
text-decoration: none;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px; color:#5e5753;
text-align: center;
}
thanks
jd
[edited by: encyclo at 8:20 pm (utc) on Jan. 21, 2007]
[edit reason] no links to personal sites please, see forum charter [/edit]
...it randomly ignores all the css...
I don't think it's random...
The :link pseudo class is for styling unvisited links only. (ie. links for pages not already in the browsers cache.) Conversely, the :visited pseudo class styles all the visited links.
Check out the W3C...
[w3.org...]
So, you need to define a style for both a.linkChalets:link and a.linkChalets:visited classes in order to cover both cases, or simply do it all in one go by styling 'a.linkChalets' directly (if you want both unvisited and visited links to look the same).
NB: the browsers default styles for :link and :visited anchors are different.