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.

How to create a html button

Discussion in 'HTML & Website Design' started by bondigor69, Dec 22, 2013.

  1. #1
    hey guys what im trying to accomplish is a button like pinterest.com
    on top left ( the categories button).

    how can I do that.

    Les says I already have my categories
    <li>cat1</li>
    <li>cat2</li>
    <li>cat3</li>
    <li>cat4</li>
    HTML:
    and onclick of he button display that categories


    thank you in advance
     
    bondigor69, Dec 22, 2013 IP
  2. tanmay.kamath1992

    tanmay.kamath1992 Member

    Messages:
    203
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #2
    ....loop started
    $categories = get_the_category();
    $ids =''foreach($categories as $category){
    $ids .=' '. $category->slug;}
    echo '<li class="'. $ids '"><img src="">cat</li>';...more loop
    
    Code (markup):
    HTML Code
     
    <li><aclass="category"href="http://link...">link_title</a><span>(some text)</span></li>
    CSS :
    div.category ol li,div.category ul li{
    display:inline-block;
    height:100%;
    width:100%;}
    div.category ol li:hover,div.category ul li:hover{
    display:inline-block;
    height:100%;
    width:100%;
    background-color:#EEE;} 
    
    Code (markup):
     
    tanmay.kamath1992, Dec 22, 2013 IP