473,387 Members | 2,436 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,387 software developers and data experts.

Beginner seeks help with css problem

Ian
'm hoping someone can help me resolve a problem I am having with
stylesheets. I've only just started usinbg them so it's more than
likely something similar. Trouble is I don't seem to be able to fix it
so would be grateful for any help.

Basically I'm working with a web page I inherited which has a menu in
which the layout/colours are something like this:

Heading (always yellow)
- Link (always white irrespective of visited or not etc but hover adds
an underline
- Link (always white irrespective of visited or not etc but hover adds
an underline
- Link (always white irrespective of visited or not etc but hover adds
an underline

ete etc
The css code I inherited is as follows:
..leftNav {
font: bold 14px Helvetica, arial;
color: #FFFFFF;
background: #663333 center;
letter-spacing: .01em;
}
td.leftNav {
font: bold 14px Helvetica, arial;
color: #FFFFFF;
text-decoration: none;
background: #663333 center;
letter-spacing: .01em;
border-top: 1px solid #000033;
border-left: 1px solid #000033;
}

td.leftNav ul {
display: block;
list-style: none;
margin: 0;
padding: 0;
}

td.leftNav li {
display: block;
padding: 5px 0px;
border-bottom: 2px solid #FFFFFF;
}

td.leftNav li a:link, a:visited, {
font-weight: bold;
color:#ffffff;
text-decoration: none;
border: none;
background: transparent;
}

td.leftNav li a:hover {font-weight: bold;
font-weight: bold;
color:#ffffff;
text-decoration: underline;
border: none;
background: transparent;
}

..menuitem { color: #FFFF00 !important; }
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
hover but it doesn't matter. I've tried various attempts at this but I
always seem to end up changing the colours of the other links on the
page in the main menu and can't understand why. So, any help would be
great.
Jul 24 '05 #1
11 1992
Personally I find it much easier to look at a "live" published example
rather than try to visualise what CSS code will look like, especially if
trying to spot a problem. You might like to publish your attempts so far?

If you want to have a specific table (or set of tables) have different link
styling, you should probably give the new table a class, and then pick out
the link properties by context.

So if you have a table of class="myNewTable" you could pick out links inside
it like this:

table.myNewTable a:link,
table.myNewTable a:visited,
table.myNewTable a:hover,
table.myNewTable a:active {
color: yellow;
}

Note that browser have their own default style sheets (which you have to
guess at and then override) so it's important (eg) to specify all variants
of a link or you may see this default styling.

I agree that it's useful to show hover and visited states, and if a link is
slow, it's also useful to show the user that a link is active (so he/she can
see that it "noticed" the click!).

--
####################
## PH, London
####################
"Ian" <ia*@home.com> wrote in message
news:v4********************************@4ax.com...

What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
hover but it doesn't matter. I've tried various attempts at this but I
always seem to end up changing the colours of the other links on the
page in the main menu and can't understand why. So, any help would be
great.

Jul 24 '05 #2
Ian
On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:
Ian wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on


Why do you want to confuse me by not letting me see which links I've
already used?


Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.

Jul 24 '05 #3
Ian wrote:
On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:
Ian wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
Why do you want to confuse me by not letting me see which links I've
already used?

Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.


I still want to know where I've been.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*
Jul 24 '05 #4
Ian
On Sun, 29 May 2005 20:56:19 +0000 (UTC), "Philip Herlihy"
<fo******@herlihy.eu.veil.com> wrote:
Personally I find it much easier to look at a "live" published example
rather than try to visualise what CSS code will look like, especially if
trying to spot a problem. You might like to publish your attempts so far?

If you want to have a specific table (or set of tables) have different link
styling, you should probably give the new table a class, and then pick out
the link properties by context.

So if you have a table of class="myNewTable" you could pick out links inside
it like this:

table.myNewTable a:link,
table.myNewTable a:visited,
table.myNewTable a:hover,
table.myNewTable a:active {
color: yellow;
}

Note that browser have their own default style sheets (which you have to
guess at and then override) so it's important (eg) to specify all variants
of a link or you may see this default styling.

I agree that it's useful to show hover and visited states, and if a link is
slow, it's also useful to show the user that a link is active (so he/she can
see that it "noticed" the click!).


Thanks very much for the example, I tried it and it seems to have done
the trick although I had to additionally define the default links for it
to work in Firefox which is my preferred browser. All seems OK now
though.

Jul 24 '05 #5
Ian wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on


Why do you want to confuse me by not letting me see which links I've
already used?

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*
Jul 24 '05 #6
AES
In article <sl********************@thurston.blinkynet.net>,
Blinky the Shark <no*****@box.invalid> wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on


Why do you want to confuse me by not letting me see which links I've
already used?


Just for info, the links in the bodies of the short blog messages that
are reproduced on Ariana Huffington's web site

<http://www.huffingtonpost.com/>

seem to work this way.

Typographically it looks considerably neater to me without the
underlining; and since each message is short and only contains a few
links, and once you've read or skimmed one message and gone on to the
next you're unlikely to go back to the earlier one, perhaps recording
which links have been used is less necessary or useful.

In any event, as a novice question, if you have several links to the
same identical URL at different places within a web page, and a visitor
follows one of those links and then returns to the starting page, under
standard HTLM do (or should) _all_ of those links change color? -- or
only the one that was clicked on?
Jul 24 '05 #7
AES wrote:
In article <sl********************@thurston.blinkynet.net>,
Blinky the Shark <no*****@box.invalid> wrote:
> What I now want to be able to add is a completely new separate table in
> which there are links which are ALWAYS yellow irrespective of visited,
> active or not, with no underline. Maybe they could change colour on
Why do you want to confuse me by not letting me see which links I've
already used?

Just for info, the links in the bodies of the short blog messages that
are reproduced on Ariana Huffington's web site <http://www.huffingtonpost.com/> seem to work this way.
Bummer.
Typographically it looks considerably neater to me without the
underlining; and since each message is short and only contains a few
links, and once you've read or skimmed one message and gone on to the
next you're unlikely to go back to the earlier one, perhaps recording
which links have been used is less necessary or useful.
And perhaps not.

I don't mind no underlining. I very much mind the absence of the
distinctive link color for visited links.
In any event, as a novice question, if you have several links to the
same identical URL at different places within a web page, and a visitor
follows one of those links and then returns to the starting page, under
standard HTLM do (or should) _all_ of those links change color? -- or
only the one that was clicked on?


I would think they all would.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*
Jul 24 '05 #8
Personally I find it much easier to look at a "live" published example
rather than try to visualise what CSS code will look like, especially if
trying to spot a problem. You might like to publish your attempts so far?

If you want to have a specific table (or set of tables) have different link
styling, you should probably give the new table a class, and then pick out
the link properties by context.

So if you have a table of class="myNewTable" you could pick out links inside
it like this:

table.myNewTable a:link,
table.myNewTable a:visited,
table.myNewTable a:hover,
table.myNewTable a:active {
color: yellow;
}

Note that browser have their own default style sheets (which you have to
guess at and then override) so it's important (eg) to specify all variants
of a link or you may see this default styling.

I agree that it's useful to show hover and visited states, and if a link is
slow, it's also useful to show the user that a link is active (so he/she can
see that it "noticed" the click!).

--
####################
## PH, London
####################
"Ian" <ia*@home.com> wrote in message
news:v4********************************@4ax.com...

What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
hover but it doesn't matter. I've tried various attempts at this but I
always seem to end up changing the colours of the other links on the
page in the main menu and can't understand why. So, any help would be
great.

Jul 24 '05 #9
Ian
On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:
Ian wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on


Why do you want to confuse me by not letting me see which links I've
already used?


Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.

Jul 24 '05 #10
Ian wrote:
On 29 May 2005 19:00:33 GMT, Blinky the Shark <no*****@box.invalid>
wrote:
Ian wrote:
What I now want to be able to add is a completely new separate table in
which there are links which are ALWAYS yellow irrespective of visited,
active or not, with no underline. Maybe they could change colour on
Why do you want to confuse me by not letting me see which links I've
already used?

Because they are not links to other web sites but represent the names of
people who are logged on to the message forum associated with the site.
Clicking on the names brings up the profile of the person but the
display looks naff when the names are in mixed colours.


I still want to know where I've been.

--
Blinky Linux Registered User 297263
Killing all Usenet posts from Google Groups
Info: http://blinkynet.net/comp/uip5.html
*ALSO contains links for access to the NON-BETA GG archive interface*
Jul 24 '05 #11
Ian
On Sun, 29 May 2005 20:56:19 +0000 (UTC), "Philip Herlihy"
<fo******@herlihy.eu.veil.com> wrote:
Personally I find it much easier to look at a "live" published example
rather than try to visualise what CSS code will look like, especially if
trying to spot a problem. You might like to publish your attempts so far?

If you want to have a specific table (or set of tables) have different link
styling, you should probably give the new table a class, and then pick out
the link properties by context.

So if you have a table of class="myNewTable" you could pick out links inside
it like this:

table.myNewTable a:link,
table.myNewTable a:visited,
table.myNewTable a:hover,
table.myNewTable a:active {
color: yellow;
}

Note that browser have their own default style sheets (which you have to
guess at and then override) so it's important (eg) to specify all variants
of a link or you may see this default styling.

I agree that it's useful to show hover and visited states, and if a link is
slow, it's also useful to show the user that a link is active (so he/she can
see that it "noticed" the click!).


Thanks very much for the example, I tried it and it seems to have done
the trick although I had to additionally define the default links for it
to work in Firefox which is my preferred browser. All seems OK now
though.

Jul 24 '05 #12

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

Similar topics

3
by: jvax | last post by:
Hi all, I hope I'm posting in the right NG... I have a data text file I want to read from a c++ program. the data file goes like this: 90 # number of balls 33 42 13
3
by: Ian | last post by:
'm hoping someone can help me resolve a problem I am having with stylesheets. I've only just started usinbg them so it's more than likely something similar. Trouble is I don't seem to be able to...
0
by: James Johnson | last post by:
I have a file that I open a FileStream and a StreamReader for. I issue a SEEK and read a series of records. I then issue another SEEK, no errors, but when I issue the read it picks up where the...
18
by: mitchellpal | last post by:
Hi guys, am learning c as a beginner language and am finding it rough especially with pointers and data files. What do you think, am i being too pessimistic or thats how it happens for a beginner?...
2
by: ducky | last post by:
Hi all, The only programming experience i have under my belt so far is VB. I'm just starting out on C++ and wonder if anybody suggests and good (free) starting points for me to get going. I'm...
20
by: weight gain 2000 | last post by:
Hello all! I'm looking for a very good book for an absolute beginner on VB.net or VB 2005 with emphasis on databases. What would you reccommend? Thanks!
0
by: Greg Corradini | last post by:
Hello all, I'm having trouble inserting an SQL selection into a new MS Access table. I get a parameter error on my insert statement when I try this (see below for code and error msg). I'm not sure...
0
by: LK~ICT | last post by:
Sri Lanka rural e-learning project seeks corporate support Dec 04, 2007 (LBO) - A Sri Lankan e-learning initiative for rural students is seeking corporate sector support to expand and cover 400...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
25
by: doznot | last post by:
Let's say you want to use Moodle to teach an introductory class in PHP programming. Some of the students have little or no computer experience. In addition to background reading and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.