Orionsbelter Posted June 22, 2009 Share Posted June 22, 2009 This has become real stress full now and sorry if this is in the wrong forum but i don't know which i need to change the PHP or CSS, See i want a menu that is 10 parts long it is Horizontal. i have managed to get it all ok to what i want it however one problem the text which is the link goes to the top center of the box, i want it in the middle, center of the box help me please can you see where i have gone wrong? here is the CSS <style type="text/css"> body { font-family: Tahoma; scrollbar-face-color: black; scrollbar-face-color: #404040; scrollbar-shadow-color: #202020; font-weight: bold; scrollbar-highlight-color: #808080; scrollbar-3dlight-color: #808080; scrollbar-darkshadow-color: #202020; scrollbar-track-color: #777777; scrollbar-arrow-color: #FFFFFF; background-image: url(includes/bglines.gif); font-size: 10px; } </style> <style type="text/css"> .suckertreemenu ul{ margin: 0; padding: 0; list-style-type: none; } /*Top level list items*/ .suckertreemenu ul li{ float: left; background-color: #252525; /*overall menu background color*/ } /*Top level menu link items style*/ .suckertreemenu ul li a{ display: block; width: 108px; /*Width of top level menu link items*/ border: 1px solid #121212; text-decoration: none; color: #7C5B28; height: 25px; text-align:center; } .suckertreemenu ul li a:hover{ background-color: #464646; display: block; width: 108px; /*Width of top level menu link items*/ border: 1px solid #121212; text-decoration: none; color: #7C5B28; height: 25px; text-align:center; } </style> here is the javascript <script type="text/javascript"> //SuckerTree Horizontal Menu (Sept 14th, 06) //By Dynamic Drive: http://www.dynamicdrive.com/style/ var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas function buildsubmenus_horizontal(){ for (var i=0; i<menuids.length; i++){ var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul") for (var t=0; t<ultags.length; t++){ if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon" } else{ //else if this is a sub level menu (ul) ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon" } ultags[t].parentNode.onmouseover=function(){ this.getElementsByTagName("ul")[0].style.visibility="visible" } ultags[t].parentNode.onmouseout=function(){ this.getElementsByTagName("ul")[0].style.visibility="hidden" } } } } if (window.addEventListener) window.addEventListener("load", buildsubmenus_horizontal, false) else if (window.attachEvent) window.attachEvent("onload", buildsubmenus_horizontal) </script> and here is the HTML <div class="suckertreemenu"> <ul id="treemenu1"> <li><a href="#">Item 1</a></li> <li><a href="#">Item 2</a></li> <li><a href="#">Item 3</a></li> <li><a href="#">Item 4</a></li> <li><a href="#">Item 5</a></li> <li><a href="#">Item 6</a></li> <li><a href="#">Item 7</a></li> <li><a href="#">Item 8</a></li> <li><a href="#">Item 9</a></li> <li><a href="#">Item 10</a></li> </ul> </div> </div> Quote Link to comment https://forums.phpfreaks.com/topic/163244-grrrrrrrr-help-meeeeee-please/ Share on other sites More sharing options...
947740 Posted June 22, 2009 Share Posted June 22, 2009 Where is the PHP? Quote Link to comment https://forums.phpfreaks.com/topic/163244-grrrrrrrr-help-meeeeee-please/#findComment-861265 Share on other sites More sharing options...
flyhoney Posted June 22, 2009 Share Posted June 22, 2009 .suckertreemenu ul li a { padding-top: 10px; /* tweak the 10 to match what you need */ } Quote Link to comment https://forums.phpfreaks.com/topic/163244-grrrrrrrr-help-meeeeee-please/#findComment-861268 Share on other sites More sharing options...
lukekelly Posted June 22, 2009 Share Posted June 22, 2009 ^--- Poster one above - Are one sentence comments like that actually useful? I cant see any PHP either - However ill not only comment on that you dont have any php but ill try and help with your problem. You got css, javascript and plain html. On first look seems to be css related - If Flyhoney's tip didnt work, try a float value for your list styling. Quote Link to comment https://forums.phpfreaks.com/topic/163244-grrrrrrrr-help-meeeeee-please/#findComment-861271 Share on other sites More sharing options...
Maq Posted June 22, 2009 Share Posted June 22, 2009 ^--- Poster one above - Are one sentence comments like that actually useful? Well the OP posted in the "PHP Help" section and stated, "sorry if this is in the wrong forum but i don't know which i need to change the PHP or CSS". So it's kind of confusing for people trying to help when the language he's referring to, aren't even in his thread. (Moving to CSS unless you discover the problem is actually JS) Quote Link to comment https://forums.phpfreaks.com/topic/163244-grrrrrrrr-help-meeeeee-please/#findComment-861277 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.