Yury Merezhkov
asked on
Highlight Current Page's Tab
Hi experts,
I am developing a project in ASP.NET using Visual Web Developer 2008 Express Edition. I have a tab menu which works perfect. I would like for a tab to stay orange while on the page that the tab links to. For example, when on Default.aspx, I would like Home tab to be highlighted. Is there any way to do that? I am using Master page. It would be easy if I didn't.
Please use IE to look at this page. It doesn't display quite right in FF.
http://www.titanmusicstore.com
Thank you.
I am developing a project in ASP.NET using Visual Web Developer 2008 Express Edition. I have a tab menu which works perfect. I would like for a tab to stay orange while on the page that the tab links to. For example, when on Default.aspx, I would like Home tab to be highlighted. Is there any way to do that? I am using Master page. It would be easy if I didn't.
Please use IE to look at this page. It doesn't display quite right in FF.
http://www.titanmusicstore.com
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oh sorry, please ignore my reply, got pasted in the wrong window
Thanks
Thanks
ASKER
Thank you! But I have a master page. I don't have body tags on each page. Just on the master page.
I've not used ASP but is there a way you can dynamically set an id to a containing element or set class="tabOn" in a li of you navigation?
ASKER
This is my first website in ASP .NET. I don't know :) I'll continue researching.
ASKER
iDeej, thanks man! I figured out how to assign id's dynamically and used CSS that you provided. It works. Check it out :)
ASKER
Great solution!
span.col2 {
margin-left: 10em;
width:100px;
}
span.col3 {
margin-left: 10em; width:100px;
}
span.col4 {
margin-left: 10em; width:100px;
}
div.row {
overflow: auto;
font-weight: bold;
width: 100%;
float: left;
padding-top: 5px;
padding-left: 0px;
padding-bottom: 5px;
padding-right: 0px
}
</style>
<div class="row">
Item One
<span class="col2">
Item Two
</span>
<span class="col3">
Item Three
</span>
<span class="col4">
Item Four
</span>
</div>
<div class="row">
Item Five
<span class="col2">
Item Six
</span>
<span class="col3">
Item Seven
</span>
<span class="col4">
Item Eight
</span>
</div>