Jump to content

Adding Image to Menu Problem


craspro

Recommended Posts

I'm doing some editing on a site as a favor to a friend.  Not having a lot of experience in PHP hasn't been a problem up until now because most of the changes were text changes, picture swaps, etc.  All of the little php quirks I've been able to figure out until now.   

 

Where I'm running into trouble is in a navigation menu comprised of images.  I'm trying to insert a new option on that menu in a list that looks like this: 

 

                <li id="nav-a"><a href="./?pg=about">About Us</a></li>

                <li id="nav-s"><a href="./?pg=services">Corporate Services</a></li>

                <li id="nav-c"><a href="./?pg=classes">Class & Lessons</a></li>

                <li id="nav-o"><a href="./?pg=staff">Our Staff</a></li>

                <li id="nav-i"><a href="./?pg=clients">Client List</a></li>

                <li id="nav-r"><a href="./?pg=register">Register with Us</a></li>

                <li id="nav-l"><a href="./?pg=links">Links to Sites</a></li>

                <li id="nav-u"><a href="./?pg=contact">Contact Us</a></li>

 

I'm trying to insert a new option between "Register with Us" and "Links to Sites."  I have the images in the correct directories, have gone into the css and created the body id's etc and nothing is working.  ALl it creates is a blank space and no link to the new page.

 

Can someone give me some guidance or point me to a place I can figure this out myself?

 

Thanks for reading. 

Link to comment
https://forums.phpfreaks.com/topic/221031-adding-image-to-menu-problem/
Share on other sites

  • 2 weeks later...

Here some sample code try this one:

<?php

$my_img = imagecreate( 200, 80 );

$background = imagecolorallocate( $my_img, 0, 0, 255 );

$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );

$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );

imagestring( $my_img, 4, 30, 25, "thesitewizard.com",

  $text_colour );

imagesetthickness ( $my_img, 5 );

imageline( $my_img, 30, 45, 165, 45, $line_colour );

 

header( "Content-type: image/png" );

imagepng( $my_img );

imagecolordeallocate( $line_color );

imagecolordeallocate( $text_color );

imagecolordeallocate( $background );

imagedestroy( $my_img );

?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.