LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-02-2010, 01:08 PM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
How to put a box around a picture on a mouseover


I have a set of images on my webpage,and when the mouse goes over them, I'd like a thin box around each image to tell the viewer that it's been selected (when clicked, it'll open a new window). How do I do this?


Thanks.
 
Old 04-02-2010, 01:22 PM   #2
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
AFAIK it might swap the image out with one with a border using onmouseover and onmouseout.
 
Old 04-02-2010, 01:35 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The rust on my html and CSS skills is pretty thick, BUT: I think you want to define a <div> that contains a picture. Then define (in CSS) how that <div> is rendered when the mouse is over it. I do not think you need to be swapping images.
 
Old 04-03-2010, 01:11 AM   #4
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
Quote:
Originally Posted by pixellany View Post
Then define (in CSS) how that <div> is rendered when the mouse is over it.
How do I do that?
 
Old 04-03-2010, 07:09 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by resetreset View Post
How do I do that?
Assuming that I am right, then it is in the CSS syntax rules----what book are you using?

If you are new to CSS, then I strongly recommend getting this book:
http://www.amazon.com/Spring-Into-HT.../dp/0131855867

And---to be completely inundated with information, go here:
http://www.w3.org/Style/CSS/
 
Old 04-03-2010, 09:24 AM   #6
phunkymunky
Member
 
Registered: Aug 2003
Location: Glasgow, Scotland
Distribution: Slackware 14.0, Debian 7.0
Posts: 60

Rep: Reputation: 22
Assuming the image is a link you can use the a:hover property in css.

see http://www.w3schools.com/CSS/css_pseudo_classes.asp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anyone ever put a different linux distro on a TiVo box? nolanpro Linux - Hardware 5 12-19-2023 04:19 PM
How can i put some strain on my linux box? Steve_T Linux - Server 9 07-21-2008 12:48 PM
How can I put KDE 3.3 on my box? Kevin1290X KTPX Linux - General 1 09-01-2004 11:14 PM
has anyone put 3 GB ram in supermicro box? a1penguin Linux - Hardware 0 07-23-2003 12:35 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration