4 replies [Last post]
forum Guy
Offline
newbie
Last seen: 16 years 52 weeks ago
Joined: 2003-11-03
Posts: 10
Points: 0

I am the followings styles defined:
#treeDiv a:link{
font-size: 8pt ;
font-family: Arial, sans-serif;
text-decoration: underline;
color: black;
}
#treeDiv a:visted{
font-size: 8pt ;
font-family: Arial, sans-serif;
text-decoration: underline;
color: black;
}
#treeDiv a:hover{
font-size: 8pt ;
font-family: Arial, sans-serif;
text-decoration: underline;
background-color: #ddd;
color: black;
}
#treeDiv a:active{
font-size: 8pt ;
font-family: Arial, sans-serif;
text-decoration: underline;
color: black;
}
The structure of the document is
<div id="treeDiv">

The link is nested deep inside this structure<a></>

</div>
I do not have control over what goes into the the div (id="treeDiv"); all the attributes, font, color, background are being rendered correctly except underline.
Does anyone have any idea why this is happening.
FI Oups

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 17 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Underline attribute ignored

Hi forum Guy,
By default all "a" elements are underlined. so I can only assume you are later on in your stylesheet setting text-decoration to none.

Hope that helps

forum Guy
Offline
newbie
Last seen: 16 years 52 weeks ago
Joined: 2003-11-03
Posts: 10
Points: 0

Underline attribute ignored

That is what is confusing me, I cannot get the default behavior.

The structure
<div id="treeDiv">
The stuff in here is written by a third party class
The link is nested deep inside this structure<a></>

</div>
I am trying to override whatever is in that nested structure, what I find even more confusing is all the other attributes are rendering according to the stylesheet except the text-decoration.
Thanks for the reply, if you can think of anything, I would love to know.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 17 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Underline attribute ignored

Hi forum Guy,
Can you link to an example page.
You could also try using !important to give the style more weight.
text-decoration: underline !important;
Hope that helps

forum Guy
Offline
newbie
Last seen: 16 years 52 weeks ago
Joined: 2003-11-03
Posts: 10
Points: 0

Underline attribute ignored

Sorry I cannot send you a link to the page, authentication is required in order to enter the environment and many other components need to be present in order for the page to work (it is dynamic). I tried your suggestion before I made the post and it did not work, appreciate it; what I discovered and I do not know if this is the correct behaviour is the following:
I have a class -
.treeClass{
font-size: 8pt ;
color: black;
font-family: Arial, sans-serif;
text-decoration:none;
white-space: nowrap;
}

which styles within the div, I was under the assumption that links within these divs would follow the style that is defined for the psuedo class. Once I removed the text-decoration attribute from the treeClass, the behaviour in my environment was okay, however when I tested it in another setting, the behaviour was unpredictable. Am I correct in assumming the the class for the div styles the div and the class for the link styles the link even if they are nested.
Thank you for all your help.
FI