1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Html menu and links

Discussion in 'HTML & Website Design' started by Matt.B, Oct 3, 2010.

  1. #1
    Hi everyone,

    I have this html code that I like to use on my site, but it has bullet points Is there a way I could add a small picture on the left sort of like bullet points but small images.

    <ul class="menu">
      <li><a href="http://website2.com" class="active" target="_top"><span>Link 1</span></a></li>
      <li><a href="http://website.com" target="_top"><span>Link 2</span></a></li>
    </ul>
    Code (markup):
     
    Matt.B, Oct 3, 2010 IP
  2. sandie_nicole

    sandie_nicole Greenhorn

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    You can insert the <img> into your code:

    <li> <img src="image-source.html" height="25" width="25"><a href="http://website2.com" class="active" target="_top"><span>Link 1</span></a></img></li>

    same process for the following menu

    Hope it helps.
     
    sandie_nicole, Oct 3, 2010 IP
  3. 51face

    51face Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you want the same image for all items, you should modify it via CSS with list-style-image attribute
     
    51face, Oct 3, 2010 IP
  4. Hosting-You

    Hosting-You Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    CSS will be easier then putting the <IMG> tag in for every point.

    ul
    {
    list-style-image: url("/images/dot.jpg");
    list-style-type:square;
    }
     
    Hosting-You, Oct 3, 2010 IP
  5. exlvl

    exlvl Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I agree! Its easier and perfect.
     
    exlvl, Oct 4, 2010 IP
  6. Qurink

    Qurink Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes. use CSS is the best way. Might specific code like this

    .menu ul {
    {
    list-style-image: url("/images/dot.jpg");
    list-style-type:square;
    }
     
    Qurink, Oct 4, 2010 IP
  7. Johnwinslet

    Johnwinslet Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I need to create my own personal page using HTML. Can someone,please,give me some ideas,tips of how can I do it ? Thank you! I would really appreciate it :)
     
    Johnwinslet, Oct 6, 2010 IP
  8. Revasmith

    Revasmith Guest

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ul
    {
    list-style-image: url("/images/imagename.jpg");
    }
     
    Revasmith, Oct 9, 2010 IP
  9. Johnwinslet

    Johnwinslet Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9

    so...this is the way i can post my picture?
     
    Johnwinslet, Oct 12, 2010 IP
  10. andresc2

    andresc2 Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yes but it will have to be the same picture, or else you would have to create different classes.
     
    andresc2, Oct 14, 2010 IP