- This topic is empty.
-
AuthorPosts
-
December 1, 2011 at 12:45 pm #35418
charlie
ParticipantSee test version…
Looks good in FireFox (3.6.24 MAC) but box shadow on rollover (:hover) isn’t working with Safari (4.1.3 MAC). And, I’m not sure about ie.Any suggestions?
Thank you,
CMDecember 1, 2011 at 2:21 pm #91686standuncan
MemberYou need to use the other browser prefixes to make it cross-browser compatible, see below:
Using different value examples, but all achieving the same look:
-webkit-box-shadow:0 0 8px rgba(0,0,0,.40);
-moz-box-shadow:0 0 8px rgb(153,153,153);
-o-box-shadow:0 0 8px #999;
box-shadow:0 0 8px #999999;
*Note: This will not work with any older versions of IE.
December 1, 2011 at 2:25 pm #91688TheDoc
Member@standuncan – it looks like that’s in there… but it doesn’t seem to be working:
#pbnj div.pbnj-charms-container div.pbnj-charm-item a:hover,
#pbnj div.pbnj-jewelry-container div.pbnj-jewelry-item a:hover,
#pbnj div.pbnj-collections-container div.pbnj-collections-item a:hover {
display: inline-block;
width: 170px;
height: 60px;
-webkit-box-shadow: 0 0 8px #999999;
-moz-box-shadow: 0px 0px 8px #999999;
box-shadow: 0px 0px 8px #999999;
}December 1, 2011 at 3:22 pm #91691charlie
ParticipantI added the -o-box-shadow for Opera, changed -webkit- to rgba color, added 0px for spread amount and some ie fixes.
But it’s still not working in Safari 4.1.3. Could it have something to do with the box-shadow being applied to an “a” tag?
#pbnj div.pbnj-charms-container div.pbnj-charm-item a:hover,
#pbnj div.pbnj-jewelry-container div.pbnj-jewelry-item a:hover,
#pbnj div.pbnj-collections-container div.pbnj-collections-item a:hover {
display: inline-block;
width: 170px;
height: 60px;
-webkit-box-shadow: 0px 0px 8px 0px rgba(153, 153, 153, 1);
-moz-box-shadow: 0px 0px 8px 0px #999999;
-o-box-shadow: 0px 0px 8px 0px #999999;
box-shadow: 0px 0px 8px 0px #999999;
-ms-filter: progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=0),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=90),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=180),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=270);
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=0),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=90),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=180),
progid:DXImageTransform.Microsoft.Shadow(Color=#999999, Strength=6, Direction=270);
}December 1, 2011 at 3:36 pm #91692standuncan
MemberOops, I over-looked you having it in there. You do not have to use rgba color-mode, I was just showing different examples.
December 1, 2011 at 3:41 pm #91693standuncan
MemberMaybe try relocating your box shadow and pseudo to the outer div instead of the a tag?
When looking through the inspector in Chrome, I don’t see any of the a:hover being applied.. like it’s not being recognized? But it is in FF and IE, hmm…
In IE, with the Filter style, it adjusts for the size of the shadow and then pushes your element. I would remove it in IE.
December 1, 2011 at 4:12 pm #91694TheDoc
MemberYea, can’t get it to show in the inspector either. I feel like there must be an error somewhere in there. Maybe on the page itself or in the CSS.
December 1, 2011 at 4:37 pm #91695charlie
ParticipantMaybe a plain border on hover for ie 7 and 8 would be simpler. I’ll try moving the hover style to the “DIV” instead of the “a” link to fix the Safari issue.
December 1, 2011 at 5:38 pm #91700noahgelman
ParticipantHmm… it might be because you have a dozen or so CSS errors.
Open up the console in firebug and enable the logging of CSS errors, find them in your css and correct them. One of them might be the root of your issue. There’s is a bug somewhere and FF is able to compensate and Safari isn’t.
December 1, 2011 at 9:51 pm #91718joshuanhibbert
Member@Hompimpa The fourth value is spread. This is a pretty handy property that acts in a similar way to a border. It is 0px by default, so it doesn’t actually need to be declared.
December 3, 2011 at 7:32 am #91801charlie
ParticipantI’ve moved the styling for hover to the div instead of the link and it’s working better. Thank you!
IE 7 is still acting funny – any ideas? I tried adding display inline for ie 7 but it’s not working.
CM
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.