Wrox Programmer Forums
|
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2007, 09:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Lost in Css

Hi all,
I am trying to get a particular style to apply to an unordered list.
I would appreciate any assistance with this at all.
this is my list
Code:
[list]<li class="current"><a href="/about-us.aspx">   About us</a>
    [list]
        <li><a href="/about-us/board-members.aspx">   Board Members</a></li>
        <li><a href="/about-us/news--events.aspx">   News &amp; Events</a>
        [list]</ul>
        </li>
    </ul>
    </li>
</UL>
This is my css
Code:
.current {  /**/
        border-bottom: 0px solid #DF6B18;
        border-right: 1px solid #B65417;
        /*background: #DF6B18 url(/media/232/liselected.gif) repeat-y top left;*/
        background: black;
        display: block;
        color: green;
        }


The background is applied as required, but the fore color of the text does not.

Any assistance will be greatly appreciated



======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
 
Old May 10th, 2007, 10:43 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Do you have an Anchor style that is overriding your List style? Personally I use something like this when I create a List style menu:

ul.Nav
{
    list-style: none;
    padding: 0;
    margin: 0;
}

li.Nav
{
    float:left;
    margin: 1,1,0,1;
}

a.Nav:link
{
    background-color:#ffffff;
    height: 2em;
    line-height: 2em;
    float: left;
    width: 9em;
    display: block;
    border: 0.1em solid #dcdce9;
    color: #0d2474;
    text-decoration: none;
    text-align: center;
}


a.Nav:visited
{
    background-color:#ffffff;
    height: 2em;
    line-height: 2em;
    float: left;
    width: 9em;
    display: block;
    border: 0.1em solid #dcdce9;
    color: #0d2474;
    text-decoration: none;
    text-align: center;
}

a.Nav:hover
{
    background-color:#ffffff;
    height: 2em;
    line-height: 2em;
    float: left;
    width: 9em;
    display: block;
    border: 0.1em solid #dcdce9;
    color: #0d2474;
    text-decoration: underline;
    text-align: center;
}

so my code might be:

<ul class=nav>
<li class=nav><a href="#" class=nav>foo</a>
<li class=nav><a href="#" class=nav>foo2</a>
</ul>

hth

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old May 10th, 2007, 11:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Thanks Doug,
You are a legend, that worked a treat.

======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
 
Old May 11th, 2007, 05:06 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Naw, not a Legend but I am glad it worked for you^^

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS HELP:! CSS EXPANDIBLE BACKGROUND FOR TITLE phpuser2000 CSS Cascading Style Sheets 2 December 19th, 2007 12:36 AM
Rich's new CSS book: Beginning CSS 2nd Edition jminatel BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 June 15th, 2007 11:55 AM
lost, please help me out... chriswinn Classic ASP Databases 4 January 26th, 2005 03:01 PM
Lost in Chapter 2 kyleridolfo BOOK: Expert One-on-One Access Application Development 0 January 5th, 2005 08:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.