hwkeye Posted May 31, 2010 Posted May 31, 2010 Hey, once again with my lousy php knowledge.. How do I add a small image next to a name on the main menu. If possible, could you show me an example code. Thank you very much! :rolleyes: Quote
Equinox Posted May 31, 2010 Posted May 31, 2010 <img src = "Image.png" alt = "Home"> Change the image name and "alt" accordingly Quote
hwkeye Posted May 31, 2010 Author Posted May 31, 2010 Hey thanks for your help but I have a little problem that im sure you would know the answer to. Where would I insert that little code you gave me on here.. print "Home Quote
Equinox Posted May 31, 2010 Posted May 31, 2010 print "<img src = "Image.png" alt = "Home" />Home Quote
hwkeye Posted May 31, 2010 Author Posted May 31, 2010 I tried that but I get this error: Parse error: syntax error, unexpected T_DNUMBER in /home/hwkeye/public_html/mainmenu.php on line 23 Quote
Equinox Posted May 31, 2010 Posted May 31, 2010 print "<img src ='Image.png' alt = 'Home' />Home That should do it, I should've realised :p Quote
sniko Posted May 31, 2010 Posted May 31, 2010 So your main directory doesn't get cluttered up, you may wish to put the images in a separate directory. Quote
SlanderDesign Posted June 5, 2010 Posted June 5, 2010 If your looking for a background image I would suggest using some CSS. and EG would be: in the css of your header or style.css add this at the bottom. .menuh{ background-image:url(images/menuhead.png); display:block; } .menuc{ background-image:url(images/menucenter.png); padding-top:10px; background-repeat: repeat-y; .menuf{ background-image:url(images/menufooter.png); display:block; } then on mainmenu.php add this under <?php: echo '<div class="menuh"></div> <div class="menuc">'; then at the bottom after Logout add this: <div class='menuf'></div> </div>"; Hope this helps :) Quote
Uridium Posted June 7, 2010 Posted June 7, 2010 tiny added bit .. print "<img src ='Image.png' title = 'Home' height ='xxx' width='xxx' border='0' />Home changed ALT to TITLE as some browsers dont like ALT xxx on both width and height can be numerical to fit an image accordingly into your game. BODER='0' Will remove the blue border around an image so when its clicked it won't look stupid.. Quote
SlanderDesign Posted June 12, 2010 Posted June 12, 2010 tiny added bit .. print "Home changed ALT to TITLE as some browsers dont like ALT xxx on both width and height can be numerical to fit an image accordingly into your game. BODER='0' Will remove the blue border around an image so when its clicked it won't look stupid.. That actually helped me :thumbsup: Thank you Regards Linton Quote
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.