473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Specific style for link in specified row using CSS

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
----------------------------------------------------------------------------
-----------
Jul 20 '05 #1
4 2906
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
----------------------------------------------------------------------------
-----------
Jul 20 '05 #2
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
----------------------------------------------------------------------------
-----------
Jul 20 '05 #3
"Laiverd.COM" <sh******************@someserver.com> writes:
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
Jul 20 '05 #4
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
----------------------------------------------------------------------------
-----------
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: techy techno | last post by:
hiii I wanted to know how can I check for a specific HTML tag or user defined TEXT and delete it when the page loads Whenver the IE loads the page my company add its COMPANY NAME in my office...
63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
6
by: Mark Cunningham | last post by:
I am curious if there is something that would be considered a proper method for locating small (three to four items) amounts of page specific styling. Or does it really matter in the great scheme...
5
by: Jacob | last post by:
Hello, I would like to define some internal styles within an HTML page, but have those style overridden by an external style sheet if it exists at the location specified by a <link> element. ...
7
by: Jamie | last post by:
Hi everyone, Meyer on p. 91 of "Eric Meyer on CSS" says that link styles must be added in LVHA order (link, visited, hover, active) or link styles will stop working. Why is that? Is there an...
1
by: Amanda H. | last post by:
I posted about this a few days ago, and I got a few suggestions that fixed part of my problem. I am using a PHP script to switch external style sheets when the viewer clicks on the style link. ...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
4
by: Marcus | last post by:
Hello, Whenever the PHP documentation references the optional link_identifier parameter in many mysql related functions (such as mysql_query, mysql_insert_id, etc.), it says: "The MySQL...
13
by: Adhal | last post by:
Hi, How can I stop hotlinking to a specific file, and I want it to redirect it to a PHP link so I can monitor the number of downloads. Here is my site with the download page:...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.