how to create stylish menu for website


SUBMITTED BY: Guest

DATE: Aug. 17, 2014, 3:48 p.m.

FORMAT: Text only

SIZE: 4.0 kB

HITS: 882

  1. <!DOCTYPE html><html>
  2. Dock menu is very impressive web element and can only seen in high quality websites.Many peope want to integrate stylish webelement in thier website but they donot have the knowledge of jquery.This is not true that dock menu can only be creatible with jquery we can also create this menu with css3.therefore today i am telling one of the best and very useful way to create this stylish menu with css.
  3. So lets create first the html structure .To create your html structure you have to create one main div inside this div create as many spans as you want but i am just creating three span.In these three span insert your images in each of your span.this is the main tpart and the construction of your dock menu.Example for instruction is given below.
  4. Forexample
  5. <div id='MicrosoftTranslatorWidget' class='Dark' style='color:white;background-color:#555555'></div><script type='text/javascript'>setTimeout(function(){{var s=document.createElement('script');s.type='text/javascript';s.charset='UTF-8';s.src=((location && location.href && location.href.indexOf('https') == 0)?'https://ssl.microsofttranslator.com':'http://www.microsofttranslator.com')+'/ajax/v3/WidgetV3.ashx?siteData=ueOIGRSKkd965FeEGM5JtQ**&ctf=True&ui=true&settings=Manual&from=en';var p=document.getElementsByTagName('head')[0]||document.documentElement;p.insertBefore(s,p.firstChild); }},0);</script>
  6. <body>
  7. <div class="dockHolder" style="height:128px;line-height:128px;">
  8. <span class="dock">
  9. <img class="dockItem" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTNiR0iGQJ81w5_IO80kUW6DVzxGRWUqgjEIGbGztTCcorr2532"/>
  10. <img class="dockItem" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSz4yMqadSEqR9USASnH-Y15twvFOFpLNTJCy_6fxCTCj8EFkPl"/>
  11. <img class="dockItem" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRXSY7Y2fwT4T4I9n4nCC-psrq-nzysOMZ-auc6vwkBr9wPr7zV"/>
  12. </span>
  13. </div>
  14. </body>
  15. Now you have to style it to complete your doct mrnu code.
  16. First step to create dock menu is that set your body background
  17. <style type='text/css'>
  18. body{
  19. margin:0;
  20. background:blue;
  21. }
  22. .dockHolder {
  23. position: fixed;
  24. text-align: center;
  25. bottom: 100px;
  26. left: 0;
  27. right: 0;
  28. height: 128px;
  29. line-height: 128px;
  30. }
  31. .dock {
  32. background:#CCCCCC;
  33. background:
  34. -o-linear-gradient(top, #AAA 0, #CCC 49%, #AAA 51%, #808080 100%);
  35. background:
  36. -moz-linear-gradient(top, #AAA 0, #CCC 49%, #AAA 51%, #808080 100%);
  37. background:
  38. -webkit-linear-gradient(top, #AAA 0, #CCC 49%, #AAA 51%, #808080 100%);
  39. border: 1px solid gray;
  40. max-width:100%;
  41. vertical-align: bottom;
  42. line-height: 1em;
  43. padding: 0 8px;
  44. border-radius: 100%;
  45. border-bottom-left-radius: 0;
  46. border-bottom-right-radius: 0;
  47. }
  48. .dockItem {
  49. display: inline;
  50. height: 50%;
  51. vertical-align: bottom;
  52. z-index:1;
  53. transition-property:width, height;
  54. -o-transition-property:width, height;
  55. -ms-transition-property:width, height;
  56. -moz-transition-property:width, height;
  57. -webkit-transition-property:width, height;
  58. transition-duration:.25s;
  59. -o-transition-duration:.25s;
  60. -ms-transition-duration:.25s;
  61. -moz-transition-duration:.25s;
  62. -webkit-transition-duration:.25s;
  63. transition-timing-function:ease-in-out;
  64. -o-transition-timing-function:ease-in-out;
  65. -ms-transition-timing-function:ease-in-out;
  66. -moz-transition-timing-function:ease-in-out;
  67. -webkit-transition-timing-function:ease-in-out;
  68. }
  69. .dockItem:hover {
  70. height: 100%;
  71. }
  72. .dockItem:active {
  73. vertical-align:top;
  74. height:95%
  75. }
  76. </style>
  77. </html>

comments powered by Disqus