css3 - issues with css triangle just around the box -


i using following code , want add triangle either in css3 format or image based

here css

<div id="middlemenu">   <span class="selected">     <a href="#" class="text traingle">view stuff</a>   </span>   <span class="text">     <a href="#">view gnen</a>   </span> </div> 

here css above

#middlemenu {   position: absolute;   width: 300px;   margin: 84px 40%;   padding-top: 5px;   color: #fff;   font-weight: bold;   font-size: 14px;   vertical-align: middle; } .traingle {   background: url(../images/arrow.png) no-repeat;   top: 31px;   left: 15px;   position: relative;   text-indent: -9999px; } #middlemenu span.selected {   background: url(../images/middlemenu.png) repeat;   color: white;   padding-top: 14px;   padding-left: 40px;   padding-right: 40px;   padding-bottom: 14px; } .text {   top: 10px; } #middlemenu span {   color: white;   padding-top: 14px;   padding-left: 40px;   padding-right: 40px;   padding-bottom: 14px; } 

files added generating arrow key

arrow

middle menu

you can create triangle in css so:

#triangle pointing upwards .div {   width: 0;    height: 0;    border-left: 10px solid transparent;   border-right: 10px solid transparent;   border-bottom: 10px solid #000; }  #triangle pointing downwards  .div {   width: 0;    height: 0;    border-left: 10px solid transparent;   border-right: 10px solid transparent;   border-top: 10px solid #000; 

}

jsfiddle.net/dpb75/2

i'm sure can see going create 1 facing left or right.

you can change size of triangle width of borders.

also, misspelled triangle


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -