Jump to content
Sign in to follow this  
TheMovieman

Mouseover Effect Code In Css

Recommended Posts

I was wondering if I can place a mouseover effect code within my style sheet. I have just coverted all my pages to PHP and am currently working on my new menu. I'd like to have an image next to the link that will highlight when the user places their mouse pointer over it but the codes I have looked at thus far need you to place part of the code in the <HEAD> section which would mean I'd have to place it in 300+ pages!

 

Is it possible? It's no big deal but I think it'd be a good looking feature.

 

Thanks,

Brian aka The Movieman

Share this post


Link to post
Share on other sites

Hi, Brian.

 

I could definitely be wrong here...but I think mouseover effects in CSS might be limited to the a:link, hover, visited and active classes. I'm sure someone will be along to tell you if I'm wrong. You could use Javascript for image rollovers, though. And since your site is coded in PHP, you could maybe make use of the include function to put it in all your pages?? Or, if you use an editor like Dreamweaver, you could actually use the find and replace tool to put the code into those 300 pages.

 

Just some ideas...someone will likely show up with more info. for you.

Share this post


Link to post
Share on other sites

Actually, I am using PHP includes for my menu but to have a rollover, I have to place code in the HEAD section. The includes I have reside in the BODY.

 

All in all, it doesn't really matter. I have different options I can use.

 

Thanks for your help, both of you. :)

 

Brian

Share this post


Link to post
Share on other sites

I just got through updating my entire site, so I think I'll take a break from it for now. I've gotten the menu basically the way I like it but once I get some time, I may do that. . . Thumbs Up

 

Thanks!

Brian

Share this post


Link to post
Share on other sites

I may over do the includes

but anything that apears on more than one page is an included module.

So its quick to make changes to any part and the space taken up is much less.

Share this post


Link to post
Share on other sites

One worthy note if you decide to use includes for all of the "header" code for your pages...don't include the keywords, metatags and other such stuff like that unless you want them to be the same for all the pages. I learned this by doing it the wrong way first...maybe it will save you from doing the same! :)

Share this post


Link to post
Share on other sites
One worthy note if you decide to use includes for all of the "header" code for your pages...don't include the keywords, metatags and other such stuff like that unless you want them to be the same for all the pages. I learned this by doing it the wrong way first...maybe it will save you from doing the same! :)

Yeah, I thought about that. Once I find the time, I will place the includes because in the future I may want to add a javascript feature or something. It would've been nice if I had planned this all out before when I converted all my files to HTML (I used to be with Homestead which adds tons of other code).

 

I've got a question. I have a friend who has Dreamweaver and I may just put my site on a jump drive, use his computer to make the changes. Is it easy and does Dreamweaver add any extra code?

 

Another question in regards to includes: I have a site meter on every page, if I were to make another include, would the site meter still work properly? (I'm sure it will still count, but I also want it to show me the entry pages, etc).

Share this post


Link to post
Share on other sites

Well, I've added the includes and they all work. I've added ones on the left side (the menu), the header (where the logo is) and the HEAD section. I may later also add one to the bottom of the page replacing the javascript one (where I have the copyright info).

 

Thanks all for your help, I appreciate it!

 

Brian

 

Movieman's Guide to the Movies

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...