Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
Tintin81 #1
Link styles with CSS
Hi there,
Please have a look at the site I'm currently working on:
[url]http://www.team-o.org[/url].
I am using CSS for virtually everything you see on the page. But how can I
make the main navigation buttons to stay orange when a page is selected?
Tintin81 Guest
-
#24095 [Com]: phpinfo styles override page styles and damage appearance
ID: 24095 Comment by: joe at monkeydepartment dot com Reported By: generic at thetahat dot com Status: Open... -
css link styles don't work
Hi-I've made a css style that is supposed to make links and visited links on the main part of my page one color and the links and visited links on... -
Different Link Styles on same page
I would like to have two different Link Styles on the same page - in the center table I have Bold and RED links but farther down I would like to... -
link font styles with db
I'm having a problem with the links that I have set up. I have anchor tags on column headings from a database that users can sort by. The sorting... -
Problem using different a:link CSS styles in Template
Is it possible to use more than one CSS for hyperlinks on a template based page. I'm trying to have different hyperlink properties on the same page.... -
Murray *TMM* #2
Re: Link styles with CSS
Add a unique identifier to each button -
<li><a href="home.htm" id="button1">Home</a></li>|
<li><a href="services.htm" id="button2">Services</a></li>|
<li><a href="about_us.htm" id="button3">About Us</a></li>|
...etc.
Add an embedded rule to each page -
#nav A#button1, #nav A#button1:active, #nav A#button1:focus {
COLOR: #f90
}
Modify the button number to suit.
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"Tintin81" <webforumsuser@macromedia.com> wrote in message
news:ddqsge$gbn$1@forums.macromedia.com...> Hi there,
>
> Please have a look at the site I'm currently working on:
> [url]http://www.team-o.org[/url].
> I am using CSS for virtually everything you see on the page. But how can I
> make the main navigation buttons to stay orange when a page is selected?
>
>
Murray *TMM* Guest
-
Tintin81 #3
Re: Link styles with CSS
Hey Murray,
Great stuff! Thanks for your help. I've changed everything as recommended!
Tintin81 Guest
-
Murray *TMM* #4
Re: Link styles with CSS
You're welcome....
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
[url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
[url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
[url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
[url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
==================
"Tintin81" <webforumsuser@macromedia.com> wrote in message
news:ddsgb5$kip$1@forums.macromedia.com...> Hey Murray,
>
> Great stuff! Thanks for your help. I've changed everything as recommended!
>
Murray *TMM* Guest
-
RichW #5
Re: Link styles with CSS
Hello y'all,
Loved your Team O. Design site, great look and most professional. :-)
I've got another approach that works well for me. I think it was Dan Cederholm
who pointed this out, in his wonderful book "Web Standards Solutions: The
Markup and Style Handbook ISBN = 1-59059-381-2. See page 228 - 231:
First give your body an ID, example <body id="home">
Then mark-up your NavBar so:
<li><a href="index.php" class="home">Home</a></li>
<li><a href="teach.php" class="teach">Teaching</a></li>
<li><a href="community.php" class="comm">Community</a></li>
<li><a href="family.php" class="fam">Family</a></li>
Then your syle sheet goes:
#home a.home, #teach a.teach, #comm a.comm, #fam a.fam {
color: #FFE680;
background-color: #BF8660;
}
You get your link effect only when the body ID and the a.class combination
result.
Advantages:
Less mark-up
can use the classes on other links on the page,
can use <body id="teach"> on all sub-pages related to that sub-category of
pages
you can use an include so that your NavBar is edited once, and styles the
links exactly where and when you need, you ner have to touch the navbar again!
See two examples at [url]http://www.rjwconsulting.org[/url] and [url]http://www.mrwteaches.net[/url]
Dan Cederholm also does some really nifty stuff with columns in that same
chapter 15 "Styling <body>" where he uses it to dynamically style a page to two
and three columns. That's for another day! You might visit
[url]http://www.friendsofed.com/books/1590593812/[/url]
Regards,
Rich
:heart;
RichW Guest



Reply With Quote

