help me write css for this problem

Discussion in 'CSS' started by adscience, Nov 4, 2007.

  1. #1
    problem is

    i've to do something like

    A single line like toolbar with

    text [icon] [icon] text text [icon]

    where text is inside <p> (it breaks line, i don't want it to)
    and icon is simply img tag. How in css can i hook them all in one single line, one after another?

    thank you in advance
     
    adscience, Nov 4, 2007 IP
  2. ska_mna

    ska_mna Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Perhaps wrap each element in a <li></li> element and then set the li property in your css to display inline with no bullet style. i.e.

    
    <ul>
    <li><p>one</p></li>
    <li><img src="" /></li>
    etc.
    </ul>
    
    Code (markup):
    And the CSS properties you'll need;

    ul, li {
    display: inline;
    list-style: none;
    }

    Something like that anyway. Google "css li ul" and read the A List Apart article that's first in the results.

    That's one way anyway I think, there are probably lots.
     
    ska_mna, Nov 5, 2007 IP
  3. adscience

    adscience Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the answer, i already used same technique and it worked.
     
    adscience, Nov 5, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    I would advise against the ul in the rule though, the rest is fine. I like my ULs as block-levels and he may run into further problems if he leaves it inline.
     
    soulscratch, Nov 5, 2007 IP