Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

HTML style help?

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:13 PM
Original message
HTML style help?
Edited on Fri May-13-05 06:18 PM by Eric J in MN
I can change the style of links throughout a page with this:

<HEAD>
<STYLE TYPE="text/css">
<!--
a:link { text-decoration:none;color: #0000ff; }
a:visited { text-decoration:none;color: #6000ef; }
a:hover { text-decoration:none;background: #FFCC66; }
-->
</STYLE>
</HEAD>

But what if I only wanted to use that style for links in one section of a page?

How could I do that with inline style?
Printer Friendly | Permalink |  | Top
ghostsofgiants Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:27 PM
Response to Original message
1. Not sure the exact html for it
Edited on Fri May-13-05 06:32 PM by primate1
But you would need to give the style an ID I think and put a <span class="whatever"> tag around the section you want it to appy to.

I'll look into it shortly for you.
Printer Friendly | Permalink |  | Top
 
ghostsofgiants Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:34 PM
Response to Reply #1
2. Actually, I'm not too sure how you'd do that
Though I am now very intent on finding out, haha.
Printer Friendly | Permalink |  | Top
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:36 PM
Response to Reply #2
3. Ok, I have a lead. I'll let you know if I do it (nt)
nt
Printer Friendly | Permalink |  | Top
 
ghostsofgiants Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:49 PM
Response to Reply #3
5. Figured it out
All you have to do is define a class for each one.

Example
<style type="text/css">
<!--
.uno a:link {
color: #990000;
}
.uno a:hover {
color: #000066;
}
.dos a:link {
color: #FF9900;
}
.dos a:hover {
color: #000000;
}

-->
</style>

Then define each section with <span class="uno"> or <span class="dos">

That's one way to do it.
Printer Friendly | Permalink |  | Top
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:53 PM
Response to Reply #5
6. Thanks, looks good (nt)
nt
Printer Friendly | Permalink |  | Top
 
ghostsofgiants Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:53 PM
Response to Reply #6
10. No problem
Printer Friendly | Permalink |  | Top
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:56 PM
Response to Reply #5
11. is there a difference between using DIV and using SPAN? nt
nt
Printer Friendly | Permalink |  | Top
 
ghostsofgiants Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:57 PM
Response to Reply #11
12. I'm not really sure
I think with a div you can define the size and position of the section. Don't know if you can to that with a span.
Printer Friendly | Permalink |  | Top
 
Project_Willow Donating Member (80 posts) Send PM | Profile | Ignore Fri May-13-05 06:42 PM
Response to Original message
4. If it's on a different section of the page
Edited on Fri May-13-05 06:43 PM by Project_Willow
for different menus in other places on the page, style within that div, ul, li.

#navlist {}
#navlist ul {}
#navlist ul li {}
#navlist ul li a:{}


try this page for help, an excellent source of tips for styling links:

http://css.maxdesign.com.au/listamatic/


edited code syntax
Printer Friendly | Permalink |  | Top
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:53 PM
Response to Reply #4
8. Thank you (nt)
nt
Printer Friendly | Permalink |  | Top
 
mcscajun Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:53 PM
Response to Original message
7. Great site for HTML, CSS, etc...
www.htmlgoodies.com

A wonderful site for beginners and others. :)
Printer Friendly | Permalink |  | Top
 
Eric J in MN Donating Member (1000+ posts) Send PM | Profile | Ignore Fri May-13-05 06:53 PM
Response to Reply #7
9. Thank you (nt)
nt
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Sat May 04th 2024, 03:00 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC