How can I make a menu like Google Analytics? No images, only CSS methods.

    1 answer 1

    Use to create menu elements table cells or <div> blocks in the style that specify the background color. For gradient use:

     background: linear-gradient (направление, цвет1, цвет2); 

    ... this is on CSS3, for compatibility specify:

     background: Цвет1; /* Для старых браузров */ background: -moz-linear-gradient(Направление, Цвет1, Цвет2); /* Firefox 3.6+ */ /* Chrome 1-9, Safari 4-5 */ background: -webkit-gradient(Направление, Цвет1, Цвет2); /* Chrome 10+, Safari 5.1+ */ background: -webkit-linear-gradient(Направление, Цвет1, Цвет2); background: -o-linear-gradient(Направление, Цвет1, Цвет2); /* Opera 11.10+ */ background: -ms-linear-gradient(Направление, Цвет1, Цвет2); /* IE10 */ 
    • Do not forget to arrange the menu in <ul> and prescribe it a style for horizontal orientation as well as remove markers - Sergey
    • By the way, what's stopping you from cramming a picture in CSS? - Sergey
    • I want to do everything without pictures - Oleg Zagorodniy
    • one
      without prefix property you need to insert after properties with prefixes - modos189
    • hmm ... in older browsers you most likely still need a picture, so either just new or alternative css with static pictures or shove them into that css. everything is described above about the gradient - Sergey