CSS Hover on individual Link (li) ???

This is a discussion on "CSS Hover on individual Link (li) ???" within the Web Page Design section. This forum, and the thread "CSS Hover on individual Link (li) ??? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 14th, 2006, 20:53
Junior Member
Join Date: Apr 2006
Age: 28
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Question CSS Hover on individual Link (li) ???

I wish to have links for the menu like this: http://www.tristarwebdesign.co.uk/te...rma/index.html

However, I wish to have MY OWN font style on each links as it can be seen on:

The only difference I want is that this guy has used "title" in order to display text on each "li" link, while I would like to use MY OWN font style instead as can be seen from my page on: http://members.lycos.co.uk/darsh25/P...te/contact.php

i.e. the font style that can be seen in links like About, Services, Owner, Template & Contact.

Code: Select all
                
<li><a title="link six" href="index.html">link six</a></li>
<li><a title="link five" href="index.html">link five</a></li>
<li><a title="link four" href="index.html">link four</a></li>
<li><a title="link three" href="index.html">link three</a></li>
<li><a title="link two" href="index.html">link two</a></li>
<li><a title="link one" href="index.html">link one</a></li>
My links are saved as an "image" (both background & the text on it) & as far as I'm aware, I couldn't possibly "hover" EACH INDIVIDUAL image of EACH of these links using CSS, could I ???

I know that I could "hover" change the background colour, but then what about the text on it ??? Is it possible to use the same fancy font AND being able to change the background colour when hover to "grey" (just as it could be seen from the "tristar" website.

My CSS code so far is:

Code: Select all
/* CSS Document */

body 
{
    background-color:black;
    background-attachment:fixed;
}

/* .................................... HEADER & FOOTER ................................... */

#header
{
    font-family:Georgia, "Times New Roman", Times, serif;
    color:white;
    text-align:center;
    width:100%; 
}

#header  a
{
    color:yellow;    
    text-decoration:none;
}

#header  a:hover
{
    text-decoration:underline;
}

#footer
{
    font-family:Georgia, "Times New Roman", Times, serif;
    color:white;
    text-align:center;
    border-top:3px solid fuchsia;
    float:left;
    background-color:black;
    width:100%; 
}

#footer a
{
    color:yellow;    
    text-decoration:none;
}

#footer a:hover
{
    text-decoration:underline;
}

/* ........................................ BANNER ........................................ */

#banner
{
    width:100%;
    border:none;
    text-align:center;
    background-color:none;
}

/* ......................................... TOP MENU .................................... */

#topMenu
{
    width:100%;
    float:right;
    border:none;
}

#topMenu ul
{
    float:left;
    margin-left:4%;
}

#topMenu ul li 
{
    display:inline;
    width:20%;
}


/* ................................... CONTENT ................................................ */

#leftContent
{
    float:left;
    width:10%;
    border:1px solid red;
    background-color:green;
}

#centerContent
{
    background-color:white;
    width:75%; 
    margin-left:1%;
    float:left;
    border:1px solid green;
}

#centerContent ul
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    list-style-type:decimal;
    color:black;
}

#centerContent li
{
    margin:3% 3%;
    line-height:1.5em;
}

#rightContent
{
    float:right;
    background-color:fuchsia;
    border:1px solid red;
    width:10%;
}

/* ................................... STYLES ......................................... */

p.first-letter:first-letter
{
    color:red;
    margin-left:5%;
    font-size:xx-large;
}

p
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    font-size:medium;
    line-height:1.5em;
    margin:2% 3%;
    color:black;
}

h4
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:center;
    font-size:x-large;
    color:green;
}

h5
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    font-size:medium;
    margin:2% 3%;
    color:blue;
}

h6
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    margin:0;
    font-size:medium;
    font-weight:normal;
    color:red;
}

.italic
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    color:black;
    font-style:italic;
}

.bold
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    color:black;
    font-weight:bold;
}

.colorTextRed
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    color:red;
}

.colorTextBlue
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    color:blue;
}

.colorTextGreen
{
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:justify;
    color:green;
}

/* ................................... TABLE ......................................... */

#contactTable
{
    background-color:white;
    border-spacing:2%;
    margin:3% 3%;
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:left;
}

#contactTable tr
{
    border:none;
}

#contactTable th
{
    color:fuchsia;
}

#contactTable td
{
    font-size:medium;
    color:black;
}

/* ................................... CLASSES ......................................... */

.table
{
    background-color:white;
    border-spacing:2%;
    margin:3% 3%;
    font-family:Georgia, "Times New Roman", Times, serif;
    border-collapse:collapse;
    text-align:left;
}

.tr
{
    border:none;
}

.td
{
    border:thin solid red;
    font-size:medium;
    padding:2px;
    text-align:center;
    color:black;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 14th, 2006, 21:08
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Hover on individual Link (li) ???

Quote:
that this guy has used "title" in order to display text on each "li" link
No he hasn't. The value of the title attribute has nothing to do directly with the link text as displayed. That's the text between:
Code: Select all
>link six</a></li>
You can hover over any element you like.

You could have your font as an image with a transparent background and use css to control the background colour in the unhovered and hovered state.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css, hover, individual, link

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS li hover. PicoDeath Web Page Design 9 Dec 19th, 2007 14:26
a:link, active, hover, visited.... mcdanielnc89 Web Page Design 35 Nov 8th, 2007 22:10
[SOLVED] styling a div with a link and hover lister110 Web Page Design 6 Oct 31st, 2007 13:33
css hover alexgeek Web Page Design 9 Aug 2nd, 2007 18:18
hii Help with hover hawashp Starting Out 1 May 13th, 2007 16:35


All times are GMT. The time now is 14:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42