Css question
Hey everyone, its been a while since I have been here, but it feels good to be back.
I am now just getting into CSS more heavily, but I have run into a small problem.
First, I use Dreamweaver MX to do my site building, and I use their CSS section for that part.
Lets say I have two tables ( we will call them table x and table y).
In table X, I want to have the following css text effects attributed to it.
That is fine, so whenver a link it created on my site, it will have those attributes. Now, what if I want a different set of CSS text effects applied to links in TABLE Y. What do I have to do to do that?
This is just where it gets confusing to me.
Thanks everyone
Bryan
Busy posted this at 20:30 — 24th November 2002.
He has: 6,151 posts
Joined: May 2001
to make a second set add a name between the a and keyword, like so:
a.table2:link { color: #990000; text-decoration: none}
a.table2:active { color: #0066CC; text-decoration: underline}
a.table2:visited { color: #990000; text-decoration: none}
a.table2:hover { color: #0066CC; text-decoration: underline}
and in links you want this effect add class="table2" into the link tag: link of course "table2" can be anything you want as long as it doesnt start with a symbol or number
Suzanne posted this at 22:02 — 24th November 2002.
She has: 5,507 posts
Joined: Feb 2000
or use id for each table, and set it contextually
jag5311 posted this at 02:35 — 25th November 2002.
They have: 202 posts
Joined: Jan 2002
Suzanne
Can you explain that a little in detail for me:p I am a little dumb:)
Thanks
bryan
Renegade posted this at 03:03 — 25th November 2002.
He has: 3,022 posts
Joined: Oct 2002
ok, u currently have
now for table x use
and for table y use
what u just did is define a class for tables x and y
to use them go like this:
x">Link
y">Link
Suzanne posted this at 03:14 — 25th November 2002.
She has: 5,507 posts
Joined: Feb 2000
heh, too cryptic, eh?
.
.
.
table#x td a:link {}
table#x td a:visited {}
table#x td a:active {}
table#x td a:hover {}
table#y td a:link {}
table#y td a:visited {}
table#y td a:active {}
table#y td a:hover {}
1. keeps presentation out of content
2. easily changed without touching content
3. easier to keep track of
jag5311 posted this at 03:28 — 25th November 2002.
They have: 202 posts
Joined: Jan 2002
Ok, so here is what it basically comes down to
Then what I would do is if I had 2 tables on the page, Table 1 and Table 2, it would look like this
---------------------
IMAGINE THE blahblahblah
and then for my other table, it would look like this. using the second set for the links
blablahblahbalh>
So whatever links were in my 2nd table would now have the attributes of
a.table2:link { color: #0066cc; text-decoration: underline}
a.table2:active { color: #990000; text-decoration: none}
a.table2:visited { color: #0066cc; text-decoration: underline}
a.table2:hover { color: #990000; text-decoration: none}
Thanks for all the help everyone
Bryan
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.