Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
I know I have seen it before, but it completely slips my mind how to do this.

What is the code to hyperlink the "field" a link is in, rather than just the link itself? I saw on one forum where not only could they mouseover the field where the Post Topic was, but the entire field was a link as well.

Like I said, silly question and I am sure its easy, but I cannot think of how to do this right now!

Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
It's a css style thingy, I don´t know exactly though how to do it.
You'll have to do some research http://www.htmlhelp.com/reference/css/

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
I actually figured it out yesterday! It is javascript'able or CSS - either way. I chose the CSS route for ease of changing across multiple pages.

Thanks Anno.

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Can you tell us how?

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
My menu table looks like the following:

[]<TABLE cellSpacing=0 cellPadding=0 width=160 border=0>
<TR>
<TD height=30>
<A class="sidenav" href="index.php">Home</A></TD></TR>
<TR>
<TD height=30>
<A class="sidenav" ref="link2.php">Link2</A></TD></TR>
</TABLE>[/]
My CSS styles are as follows, and you can obviously change a bit of this up. The important one to keep is the width=100%, which spans your table field across the entire width:

[].sidenav {
background-color: #990000;
border: 1px #000000 solid;
width: 100%;
color : #FFFFFF;
text-align : left;
padding-left: 10px;
padding-top: 7px;
padding-bottom: 7px;
}
.sidenav:link {
color : #FFFFFF;
text-decoration : none;
}
.sidenav:active {
color : #FFFFFF;
background-color: #C00000;
}
.sidenav:hover {
color : #FFFFFF;
background-color: #C00000;
text-decoration : none;
}
.sidenav:visited {
text-decoration : none;
}[/]

CAVEAT: If you define default colors and styles for your links (ie A:link A:hover A:visited, etc...) it will mess with your menu. So yes, you have to style define each "section" with it's own link attributes.

Hope that made sense.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)