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
Highlighting Links...
Old 08-31-2009, 09:09 PM Highlighting Links...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
My css has this:

Code:
.highlight {
background-color: #FFFF00;
color: #000;
}
and that works just fine, but what I want to accomplish is having a some links highlighted in a highlight 'block' one link underneath the next (in menu form)...How is that done? All I keep getting is every other line is showing the page background color...I used to know the trick, but I forgot...Someone care to share?

Thanks.
__________________
Made2Own

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

Last edited by Brian07002; 08-31-2009 at 09:19 PM..
Brian07002 is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-02-2009, 06:11 PM Re: Highlighting Links...
portkey's Avatar
Skilled Talker

Posts: 54
Name: Erica Dion
Trades: 0
I'm confused by what you're asking, but if it's a menu you're looking for, usually using a UL list is the best way to get the block look..

CSS Code:
Code:
.menu{
border: 1px solid grey;
background-color: white;
border-bottom: 0;
width: 200px;
}

.menu ul{
list-style-type: none;
}

.menu a{
display: block;
padding: 5px;
width: 190px;
color: #000000;
border-bottom: 1px solid grey;
}

.menu a:hover{
background-color: #FFFF00;
color: #000000;
}

HTML Code:
<ul class="menu">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
You can also add the following code to your piece of css, but if the link is in a paragraph, it may mess up the alignment a little bit.

Code:
.highlight {
background-color: #FFFF00;
color: #000;
padding: 5px;
}
__________________
Hysterical Web Design

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

Fair priced and reliable web design services that complement your website needs
portkey is offline
Reply With Quote
View Public Profile Visit portkey's homepage!
 
Old 09-04-2009, 12:10 PM Re: Highlighting Links...
Giselle's Avatar
"Happy Trails"

Posts: 9,981
Name: Giselle
Location: Washington State
Trades: 0
Brian I hope this can help you because I am real new to CSS, and I think what you are asking is what took me several weeks to figure out among other things. I have two lists, one vertical with many links, one link below the other link and the other list is horizontal and it works, the horizontal list is below the vertical list. Originally with the vertical list I had a huge space between each link, didn't look good. I ended up going to w3 schools working with the information trying to apply it to my page, I will supply the code which I used and the links.

CSS:

ul
{
list-style-type:none;
padding:0;
margin:0;
font: 1em bold Arial, Helvetica, sans-serif;
padding: 1em 0;
font-weight: bold;
text-align: left;
margin-left: 4px;

}
li
{

HTML:

<ul>
<li><a href="http://urladdress">name of link</a></li>
<li><a href="http://urladdress">name of link</a></li>
(so on and so forth)
</ul>

http://www.w3schools.com/css/css_list.asp

http://www.w3schools.com/css/tryit.a...ckground-image

Hope this helps you......
Giselle is offline
Reply With Quote
View Public Profile
 
Old 09-04-2009, 11:03 PM Re: Highlighting Links...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Yep, just what I was looking for, I appreciate both of your replies!

Thanks
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Highlighting Links...
 

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.41462 seconds with 12 queries