logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-05-2013, 08:45 AM   #1
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default sprite navigation

I thought I had this working correctly. the math is correct for the button location but although it works correctly in DW it the rollover is displaying incorrectly. Any pointers/help would be greatly appreciated.

http://www.norcalaircooledgroup.org/matt2/mpr/
BullDog is offline   Reply With Quote
Old 03-05-2013, 10:19 AM   #2
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

I've also pushed the fans background to the bottom of a 100% height div, but cant seem to get the footer to the bottom on top of it now.

Thank you
BullDog is offline   Reply With Quote
Old 03-05-2013, 11:39 AM   #3
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

please disregard the footer issue. not the way I wanted to handle it but it will work. the navigation however is still baffling me.
BullDog is offline   Reply With Quote
Old 03-05-2013, 12:26 PM   #4
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

I managed to get this working by changing from:

Code:
#nav-home { width: 78px; }
#nav-home a:hover{ background-position:  bottom -29; }
to

Code:
#nav-home { width: 78px; }
#nav-home a:hover{ background-position: -29px bottom; }
Now I would swear This used to work as I pulled this from a video tutorial.

I would still be very interested to hear if I found the correct error/fix or if there is another issue I'm missing.
BullDog is offline   Reply With Quote
Old 03-05-2013, 02:16 PM   #5
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

All I can say is that why do you take 'bottom' as referrer to get the right coordinates of your sprites buttons. I know it works, but it's a bit awkward to me.

The default value of background-position is 0 0 which is top left, thus the default background position is the top left corner of the image. If I have to get my coordinates in a sprite then that's my starting point to do the math.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 03-05-2013, 04:10 PM   #6
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

Thats just the way I learned from a couple tutorials. have only done it a couple times before.

If I change that "bottom" to "-32" it doesnt work correctly

Last edited by BullDog; 03-05-2013 at 04:17 PM..
BullDog is offline   Reply With Quote
Old 03-12-2013, 09:11 AM   #7
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Quote:
Originally Posted by BullDog View Post
If I change that "bottom" to "-32" it doesnt work correctly
-32 doesn't do anything indeed. -32px does.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 03-12-2013, 11:14 AM   #8
BullDog
 
Join Date: Nov 2011
Location: Alameda, CA
Posts: 156
Default

Thank you... always seems to be the obvious, just cant always see it when you've been looking at it for hours.
BullDog is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:41 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com