hwkeye Posted May 31, 2010 Share 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 Link to comment Share on other sites More sharing options...
Equinox Posted May 31, 2010 Share Posted May 31, 2010 <img src = "Image.png" alt = "Home"> Change the image name and "alt" accordingly Quote Link to comment Share on other sites More sharing options...
hwkeye Posted May 31, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
Equinox Posted May 31, 2010 Share Posted May 31, 2010 print "<img src = "Image.png" alt = "Home" />Home Quote Link to comment Share on other sites More sharing options...
hwkeye Posted May 31, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
gurpreet Posted May 31, 2010 Share Posted May 31, 2010 Post up lines 20-25 Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted May 31, 2010 Share Posted May 31, 2010 Might want to try ... Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 31, 2010 Share Posted May 31, 2010 print "<img src ='Image.png' alt = 'Home' />Home That should do it, I should've realised :p Quote Link to comment Share on other sites More sharing options...
sniko Posted May 31, 2010 Share 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 Link to comment Share on other sites More sharing options...
hwkeye Posted May 31, 2010 Author Share Posted May 31, 2010 Thanks to everyone who helped me :) Quote Link to comment Share on other sites More sharing options...
SlanderDesign Posted June 5, 2010 Share 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 Link to comment Share on other sites More sharing options...
Uridium Posted June 7, 2010 Share 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 Link to comment Share on other sites More sharing options...
SlanderDesign Posted June 12, 2010 Share 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 Link to comment 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.