(I’ve finally figured out sprites! Thanks for the links also!)
Something strange is going on with one of my pages:
http://134.74.236.60/~web1tue09/projects/michael_luboa/Final/work-1.html
It’s supposed to have “Work 1″ in black and white, not home. The css is correct, as far as I’m aware of. The position is for the black and white “Work 1″ part of the sprite, not for “Home.” Maybe I need to check again, but is there another reason why this might happen?
Interesting problem. I was trying to solve it. Then gave up.
I think you can simplify your css. The way you are coding now if you have 20 menu item then you are creating 20 different ID for them! Instead of doing that you can write generic code.
Example:
CSS
HTML
So with the “selected” class whatever you are doing will be active.
Comment by adnan — December 14, 2009 @ Monday, December 14, 2009 8:41 pm
Over look that code. I just realize image Sprite will not work that way.
I tried, no!
Comment by adnan — December 14, 2009 @ Monday, December 14, 2009 9:05 pm
Looks like you just need to alter your CSS on that particular page:
Set the background-position correctly. Otherwise everything seems fine.
Comment by joe — December 15, 2009 @ Tuesday, December 15, 2009 1:39 am
Haha, thanks Adnan, I thought there had to be a simpler way to do it too, but couldn’t think of it either.
I figured out the problem… on my html, the css links points to the home page’s css, not the one for Work 1 page…
Comment by Michael — December 16, 2009 @ Wednesday, December 16, 2009 9:56 am
hi prof, I fix my Exercise 1
Exercise 2, Exercise 3,and Exercise 4, Midterm. excuse for not let you know this before …
Comment by roque — December 23, 2009 @ Wednesday, December 23, 2009 1:25 am