/    Sign up×
Community /Pin to ProfileBookmark

how to add correctly class name to particular List style?

Hello,
I have code for css like:

[code=php]
ul {list-style-type:none;}
li {list-style-type:none;
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;
background: transparent url(myimage.gif) no-repeat 0px 1px;
padding-bottom:2px;
padding-left:20px;
line-height:11px;
}
<ul class=”link”><li><a href=”mailto:[email protected]” >[email protected]</a></ul>

[/code]

How to add class correctly as I have many css names with list styles.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@felgallMay 23.2007 — ul.link {....}

li.link {....}
Copy linkTweet thisAlerts:
@toplisekauthorMay 23.2007 — 
  • 1. question:

    Is there some solution that there will be not <li class="link">


  • like

    <ul class="link"><li>

    But I have another li defined in css script

  • 2. question

    If I have in code above class with css script, it will give me space at the top and bottom.

    How to avoid this space?


  • Code is like:
    [code=php]

    <p>
    Text1<br />
    text2<br />
    text3
    <ul class="link"><li class="link"><a href="mailto:[email protected]">[email protected]</a></li></ul><br />
    </p>
    [/code]


    It seems problem because there is within tage <p> but I need to have as this is for space between text paragraph

    Please help?
    Copy linkTweet thisAlerts:
    @WebJoelMay 23.2007 — 1. question:

    Is there some solution that there will be not <li class="link">

    like (html)

    <ul class="nav"><li>[/QUOTE]

    Yes: your CSS:

    [B]ul.nav li {}[/B]

    and give [I]that[/I] the {} the values of [I]<li class="link">[/I], so that all list-item links in the UL "nav" will have the value assigned. I would not name an id or class "link", btw. Avoid confusion. -It's like giving a DIV an id="body" and "body" is a reserved word, meaning something other than 'an id' or 'a class', -you know? Whereby "nav"(igation) is self-explanatory (semantic by it's name = name it by what it is). I personally would like to give a boot-kick to the DW coder whom made the software name it 'layers' numerically (layer1, layer2, layer3 etc...)... it's really troublesome to wade through a convoluted page-bloated document that has multi-nested layers so named... [I]anyway[/I]... :o

    2. question

    If I have in code above class with css script, it will give me space at the top and bottom.

    How to avoid this space?

    Code is like:
    [code=php]

    <p>
    Text1<br />
    text2<br />
    text3
    <ul [B]class="nav"[/B]><li><a href="mailto:[email protected]">[email protected]</a></li></ul><br />
    </p>[/QUOTE]
    by putting:

    * {margin:0; padding:0}

    as your first line in the CSS, all padding & margins are stripped out, thus, you would need to state your desired margin & padding for all elements. Thus, [B]not[/B] stating any padding or margin in [B]ul.nav {}[/B] means NO margin or padding between the text and the edge of the UL... does that make any sence? There would need to be a few additional Selectors and declarations needed to make this work, but it should come out looking like:

    text1
    text2
    text3 [U][COLOR="Blue"][email protected][/COLOR][/U]

    -if that was your intention... (else, I misunderstand the question).

    Not sure if I understand why you need to wrap an UL in a <p>, you could just give <ul id="nav"> some margin-top:; margin-bottom:0; in the CSS..
    Copy linkTweet thisAlerts:
    @toplisekauthorMay 23.2007 — Hello,

    I have made code as following:
    [code=php]
    css like:
    #mainctnR1 p{
    margin:0em 0em 1em 0em;
    text-indent:0em;}

    #mainctnR1 ul {list-style-type:none;margin:0px;padding-left:20px;}
    #mainctnR1 il
    { list-style-type:none;
    font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;
    background: transparent url(../images/mail.gif) no-repeat 0px 1px;
    padding-top:0px;
    padding-bottom:2px;
    margin-left:40px;
    }

    <div>
    <p><b>Heading</b><br />
    Text1<br />
    Text2<br />
    Text3
    <ul><li><a href="mailto:[email protected]" >[email protected]</a></li></ul>
    </p>
    </div>
    [/code]


    there is image 16x16

    1.How to do script that image will be seen all on web site?

    2. It gives me too much space between Text3 and tag <ul>
    ×

    Success!

    Help @toplisek spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...