Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 09-04-2008, 02:30 AM   #11 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,685

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: CSS Li and Underline

Works fine for me; using this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Black Text Red Underline</title>
<style type="text/css">
div.blackred {text-align:center}
span.c2 {text-decoration: underline; color: red;}
span.c1 {color: black;}
</style>
</head>
<body>
<div class="blackred"><span class="c2"><span
class="c1">Black
text, red underline</span></span>
</div>

</body>
</html>

__________________

Need website help? PM me!
CrazeD is offline  
Old 09-04-2008, 08:42 AM   #12 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default Re: CSS Li and Underline

CrazeD,
This is what i have in my CSS
span.c2 {text-decoration: underline; color: red;}
span.c1 {color: cfcfff;}
div.blackred {text-align:center}

and here the HTML code for the red underline is published
Solution For Iron Deficiency Due To Iron Supplement Causing Digestive Problems For Iron Deficiency Due To Iron Supplement Causing Digestive Problems/


I tried removing the line <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" ?> that I have just before the Doctype, but it didn't fix the problem. (The line is for stopping IE6 from having the pages shifted to the right off the browser.)

I can't figure it out, maybe it's a wordpress thing?

Rex
Rex100 is offline  
Old 09-04-2008, 11:44 AM   #13 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,685

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: CSS Li and Underline

Quote:
Originally Posted by Rex100 View Post
CrazeD,
This is what i have in my CSS
span.c2 {text-decoration: underline; color: red;}
span.c1 {color: cfcfff;}
div.blackred {text-align:center}

and here the HTML code for the red underline is published
Solution For Iron Deficiency Due To Iron Supplement Causing Digestive Problems For Iron Deficiency Due To Iron Supplement Causing Digestive Problems/


I tried removing the line <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" ?> that I have just before the Doctype, but it didn't fix the problem. (The line is for stopping IE6 from having the pages shifted to the right off the browser.)

I can't figure it out, maybe it's a wordpress thing?

Rex
You forgot the # symbol before the text color.

Code:
span.c2 {text-decoration: underline; color: red;}
span.c1 {color:#cfcfff;}
div.blackred {text-align:center}

__________________

Need website help? PM me!
CrazeD is offline  
Old 09-04-2008, 08:02 PM   #14 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default Re: CSS Li and Underline

Craze,
I have been meaning to check my work with a validator before asking, so I did, after the fact, and it passed, and now I realize a CSS validator check is also necessary when everything looks right. Of course, even the error "Value Error : color cfcfff is not a color value : cfcfff " may not provide the necessary detail.

Thanks,

Rex
Rex100 is offline  
Old 10-03-2008, 11:30 PM   #15 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default Re: CSS Li and Underline

CrazeD,
I want to put the code in a <ul> and I found you can change <div> to <li> and it will work. One problem though, but I'll skip the explanation and ask this question
If I have
<ul class="linklist"> that means all the <li>s in the <ul> follow the "linklist" css class. What if I have an <li> in the <ul> that I don't want to follow "linklist" class? How do I code that <li>?

----

The code:
<li class="uncoleft">
<span class="c2">
<span class="c1">
<strong>Solutions</strong></span></span></li>
<li class="uncolright">
<span class="c2">
<span class="c1"><strong>and&nbsp;Cures</strong></span></span></li>


Is the title for the links of the link list.


Thanks,

Rex
Rex100 is offline  
Old 10-04-2008, 03:49 AM   #16 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,685

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: CSS Li and Underline

It will inherit some things, but other things might need to be defined to the <li> specifically.

If <li> inherits something you don't want, you can just change the CSS for <li>

For example:

Code:
ul { color: #fff; }
li { color: #000; }

__________________

Need website help? PM me!
CrazeD is offline  
Old 10-04-2008, 02:59 PM   #17 (permalink)
 
Newb Techie

Join Date: Jul 2008

Posts: 30

Rex100 is on a distinguished road

Default Re: CSS Li and Underline

Thanks Craze
Rex100 is offline  
 
Closed Thread

Thread Tools
Display Modes

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