HighDots Forums  

Specific style for link in specified row using CSS

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Specific style for link in specified row using CSS in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Laiverd.COM
 
Posts: n/a

Default Specific style for link in specified row using CSS - 07-09-2004 , 04:46 PM






Posted this in the MM Dreamweaver group also, but then found this newsgroup,
in which I hope someone knows the answer

What I'd like to do is define a specific style for a link that is in a
specific row. This works, but has a drawback:

tr.homeLatestNews a.newsLink {
font-weight: bold;
display: block;
}

but then a would have to assign a class "newsLink" to the link every time. I
also tried:

tr.homeLatestNews a {
font-weight: bold;
font-style: italic;
display:block;
}

Italic and block is displayed, but not bold. Using:

tr.homeLatestNews a:link {
font-weight: bold;
font-style: italic;
display:block;
}

Nothing is displayed at all. Funny thing is that I can preview it in
Dreamweaver (MX2004) but it fails to show completely in IE6 (On winxp) This
is the HTML:

<table width="707" border="1" cellspacing="4" cellpadding="0"
bgcolor="#D5DCE6">
<tr bgcolor="D8DEE6" class="homeLatestNews">
<td width="50%" bgcolor="#D3DBE7" align="LEFT"
valign="TOP"><p><span class="latestNewsHeader">Volop ...workshops... <a
href="#" target="_top">Lees verder</a></p></td>
</tr>
</table>

BTW: this is actually the my first attempt at taking CSS a lot further than
I did sofar. With the help of the great book by Eric Meyer I can get pretty
far. but this is confusing me ;-)

Thanks for your help.

John
--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_gr..._ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------



Reply With Quote
  #2  
Old   
Laiverd.COM
 
Posts: n/a

Default Re: Specific style for link in specified row using CSS - 07-10-2004 , 08:55 AM






Hmm

#homeLatestNews a {
font-weight: bold;
display: inline;
}

Seems to work in IE6, but I still wonder why my previous setup wouldn't
work. Other thatn that: use

#homeLatestNews a:link {
font-weight: bold;
display: inline;
}

and it stops working again. Really puzzled.
John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_gr..._ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------



Reply With Quote
  #3  
Old   
Laiverd.COM
 
Posts: n/a

Default Re: Specific style for link in specified row using CSS - 07-10-2004 , 11:53 AM



Not entirely unlogical as there's a <p> inside the td, this also works:

tr.homeLatestNews p a {
font-weight: bold;
display: inline;
}

But again:

tr.homeLatestNews p a:link {
font-weight: bold;
display: inline;
}

Doesn't. BUT ;-)

tr.homeLatestNews p a:visited {
font-weight: bold;
display: inline;
}
tr.homeLatestNews p a:hover {
font-weight: bold;
display: inline;
}

and

tr.homeLatestNews p a:active {
font-weight: bold;
display: inline;
}


ALL work (even if the 'p' is left out); something I am missing about the
whole a:link thing??

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_gr..._ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------



Reply With Quote
  #4  
Old   
Chris Morris
 
Posts: n/a

Default Re: Specific style for link in specified row using CSS - 07-12-2004 , 06:30 AM



"Laiverd.COM" <share_your_knowledge (AT) someserver (DOT) com> writes:
Quote:
tr.homeLatestNews p a:link {
Doesn't. BUT ;-)

tr.homeLatestNews p a:visited {
tr.homeLatestNews p a:hover {
and
tr.homeLatestNews p a:active {

ALL work (even if the 'p' is left out); something I am missing about the
whole a:link thing??
:link means _unvisited_ links.

So quite often you need to either define for 'a' without :anything or
define for all of them.

This is probably what you're missing, but since you haven't provided a
link to a page demonstrating the problem, it's hard to do more than
make vague guesses.

--
Chris


Reply With Quote
  #5  
Old   
Laiverd.COM
 
Posts: n/a

Default Re: Specific style for link in specified row using CSS - 07-12-2004 , 08:30 AM



Thanks for thinking with me Chris. In the meantime I was able to solve the
problem. Actually there was no problem,so it turned out; but the style was
just not nociteably visible because the page was visited before ;-) and no
styles for visited etc. were yet created. Typical case of 'the answer is
right in front of you ;-)'.

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_gr..._ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.