Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How to highlight current page link in your menu?
Old 04-14-2007, 09:42 AM How to highlight current page link in your menu?
Novice Talker

Posts: 11
Name: Rama Mohan Akundi
Location: Hyderabad
Trades: 0
One day my friend shyam designed a web site. He has to make highlight his left menu with his current layout. But he is not familiar with CSS. So he used PHP variable for his site. Putting PHP variables in every page is very large work and it will give many problems.

So I thought that there must be a way with CSS. I have tried. To be frank I searched many sites to get any relevant code.

At last I got it. Here you can have the code.

First Step: write a style sheet.

li{
color:#006600;
}

#home .home, #about .about, #contact .contact.li{
font-weight:bold;
list-style: square outside;
color:green;
text-decoration:none;
}
Now attache it to your document.

Second Step: In your left menu, you have to write like this:

<ul>

<li class="home"><a href="#" class="home">Home</a></li>

<li class="about"><a href="#" class="about">About
us</a></li>

<li class="contact"><a href="#" class="contact">Contact
us</a></li>

</ul>


3rd step: You have to write an Id in your document body tag:
If your page is home, it should be <body id="home">

Recently I have modified this for my company site.

I will come up with my modificated code later.
__________________
Mohan

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
akundimohan is offline
Reply With Quote
View Public Profile Visit akundimohan's homepage!
 
 
Register now for full access!
Old 04-14-2007, 10:42 AM Re: How to highlight current page link in your menu?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
The beauty of crappy code samples is that they can be Googled to find out where else they have been posted.

I found this feed when I did so (for the go4webdesign site in Mohan's signature) :

http://www2.blogger.com/feeds/522484.../posts/default

LadyNRed wrote the Web Standards sticky, NOT you. Stop content jacking other people.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-14-2007, 11:20 AM Re: How to highlight current page link in your menu?
Novice Talker

Posts: 11
Name: Rama Mohan Akundi
Location: Hyderabad
Trades: 0
I feel it is not a big mistake. Because collection of good articles is my hobbies and I share my experiences, collections with others. So please cool.
__________________
Mohan

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
akundimohan is offline
Reply With Quote
View Public Profile Visit akundimohan's homepage!
 
Old 04-14-2007, 11:55 AM Re: How to highlight current page link in your menu?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
OH, but it IS a big deal !! You don't even have the DECENCY to CREDIT ME as the originator of the list, you stick YOUR name on it as if you wrote it !

Granted, all I did was make a list of my resources, but it is NOT YOUR LIST, you just hi-jacked it. How rude !

**I have made it known that the source of that list is MINE ! **
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Last edited by LadynRed; 04-14-2007 at 11:57 AM..
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-14-2007, 12:47 PM Re: How to highlight current page link in your menu?
Novice Talker

Posts: 11
Name: Rama Mohan Akundi
Location: Hyderabad
Trades: 0
I am sorry to not publish your name and URL. Now I have added. Please have a look. But Is it bad to post someones topic in my blog?
__________________
Mohan

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
akundimohan is offline
Reply With Quote
View Public Profile Visit akundimohan's homepage!
 
Old 04-15-2007, 04:41 AM Re: How to highlight current page link in your menu?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
But Is it bad to post someones topic in my blog?
YES especially without proper accreditation.

AND, if you DO NOT have explicit permission to use someone else's material and someone decides to, they can file a DCMA complaint and your site will be shut down.
Google (who own blogger/blogspot) take these very seriously indeed.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-15-2007, 06:40 AM Re: How to highlight current page link in your menu?
Novice Talker

Posts: 11
Name: Rama Mohan Akundi
Location: Hyderabad
Trades: 0
Thanks ! than I will ask permission before I like to post someone's meterial.
and also try to remove that kind of my previous posts.
__________________
Mohan

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
akundimohan is offline
Reply With Quote
View Public Profile Visit akundimohan's homepage!
 
Old 04-15-2007, 08:10 AM Re: How to highlight current page link in your menu?
Novice Talker

Posts: 11
Name: Rama Mohan Akundi
Location: Hyderabad
Trades: 0
I have removed the ladynred's article from my blog today.
__________________
Mohan

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
akundimohan is offline
Reply With Quote
View Public Profile Visit akundimohan's homepage!
 
Reply     « Reply to How to highlight current page link in your menu?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.38598 seconds with 12 queries