easyeman
Active member
Hey all, well I got that menu working but now I need to fix the header. Basically, I want to do rollover effects for a button, but it has to be with a server control. I got it working just like I want it to with <a> tags and such, and then using CSS...but I need to make it work with ASP.net server controls but it's not wanting to work right. I guess I just need to know how to convert the existing code I have to make it a server control, but have it work like it is now.
I'll post the code so you can see what I have...the html for the header buttons and the CSS I have for it. I've researched on the web and cannot find how to do this with server controls, but I found some on just rollover in general. The reason I need these as server controls is so that the other parts of the site work correctly since they link off what's in the server control. I'm sure there's a way but I just can't get it to work right and cannot find anything major I can use online (at least from what I've seen). Any help would be greatly appreciated...thanks!
I'll post the code so you can see what I have...the html for the header buttons and the CSS I have for it. I've researched on the web and cannot find how to do this with server controls, but I found some on just rollover in general. The reason I need these as server controls is so that the other parts of the site work correctly since they link off what's in the server control. I'm sure there's a way but I just can't get it to work right and cannot find anything major I can use online (at least from what I've seen). Any help would be greatly appreciated...thanks!
VB.NET:
<td colspan="4">
<div class="cssnav"><a href="/Login.aspx" runat="server" title="Log In"><img src="/images/header/downbtn.jpg" alt="Log In" /><span>Log In</span></a></div>
<div class="cssnav"><a href="/info/FAQ.aspx" runat="server" title="Help"><img src="/images/header/downbtn.jpg" alt="Help" /><span>Help</span></a></div>
<div class="cssnav"><a href="/info/ContactUs.aspx" runat="server" title="Contact Us"><img src="/images/header/downbtn.jpg" alt="Contact Us" /><span>Contact</span></a></div>
<div class="cssnav"><a href="/info/AboutUs.aspx" runat="server" title="About Us"><img src="/images/header/downbtn.jpg" alt="About Us" /><span>About Us</span></a></div>
<div class="cssnav"><a href="/Account/MyAccount.aspx" runat="server" title="Account"><img src="/images/header/downbtn.jpg" alt="Account" /><span>Account</span></a></div>
<div class="cssnav"><a href="/default.aspx" runat="server" title="Home"><img src="/images/header/downbtn.jpg" alt="Home" /><span>Home</span></a></div>
</td>
VB.NET:
body
{
}
.cssnav
{
position: relative;
float: right;
font-family: verdana;
background: url(/images/header/overbtn.jpg) no-repeat;
white-space: nowrap;
display: block;
width: 80px;
height: 20px;
margin: 0;
padding: 0;
overflow: hidden;
}
.cssnav a
{
display: block;
color: #000000;
font-size: 10px;
width: 80px;
height: 20px;
float: left;
color: #FFFFFF;
font-weight: bold;
text-decoration: none;
overflow: hidden;
}
.cssnav a:hover
{
color: #000000;
font-weight: bold;
}
.cssnav img
{
width: 80px;
height: 20px;
border: 0;
}
* html a:hover
{
visibility: visible
}
.cssnav a:hover img
{
visibility: hidden
}
.cssnav span
{
position: absolute;
left: 2px;
top: 3px;
text-align: center;
width: 80px;
cursor: pointer;
}