Jump to content

Mouseover Effect Code In Css


TheMovieman

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

Link to comment
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.

Link to comment
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! :)

Link to comment
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).

Link to comment
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

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...