Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bordering Problem

Status
Not open for further replies.

tiamat2012

Programmer
Dec 12, 2004
144
US
Hey, I've discovered that when you put a border around an image it moves everything else. I didn't mind this that much when there were three or four images, however, at one point I have a line of 8 by 3 pictures, 150 by 200, with a onMouseOver that puts a blue border around the picture, and gets rid of it with onMouseOut.

All the pictures go frantic when I touch one of them; is there a way I can stop them from moving though still putting a border around them? (Only onMouseOver)

Thank you for your time,
-Tiamat
 
When you mouse over, in addition to adding a border, can you decrease its width? Also, to avoid with calculation issues, google the "Box Model Hack".

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakespearean sonnet.
 
Thanks, it worked. I didn't quite figure out the Box Model Hack but I'm sure more research will uncover its efficiency :).

I had exact calculations on the pictures I was dealing with and it was in a loop, so only a couple figures had to change, and calculating in this case wasn't a problem.

Thank you very much,
Tiamat
 
how about putting a border of the same colour as the background around the images when they arent mousedOver?

Then you simply change the colour of the border rather than adding a border... the element always occupies the same space.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top