- This topic is empty.
-
AuthorPosts
-
November 26, 2014 at 6:05 am #189261
Prashant
Participant- Chrome and safari both supports
webkit
. then why margin-top different for chrome and safari? - What is the solution on that? I dont want to try
padding-top
..because of some reason.
this is my demo code for responsive design.
div id='demo'></div> #demo{ position:absolute; margin-top:22%; width:10%; border:1px black solid; height:5%; }
November 26, 2014 at 6:22 am #189267Paulie_D
Member22% of what?
Are you using a reset in your CSS?
November 26, 2014 at 6:59 am #189273Prashant
Participant22% of body or parent div.
yes, I am using reset css.
November 26, 2014 at 7:28 am #189276Paulie_D
MemberThe you’d have to demo it.
Which version of Chrome or Safari are you using and what OS
November 26, 2014 at 8:44 am #189278Prashant
Participantchrome 40 and safari 5.7.1 something
November 26, 2014 at 8:58 am #189281Paulie_D
Memberyou’d have to demo it
November 26, 2014 at 9:28 am #189286Prashant
Participantyes
November 27, 2014 at 1:21 am #189328November 27, 2014 at 1:24 am #189329Paulie_D
MemberWhen you demo it we can take a look.
November 27, 2014 at 2:41 am #189332Prashant
Participant@Paulie_D how can i show you my demo on different browser? i some have restriction on my server…. i already paste my code. You can test on your local server using above code.
http://jsfiddle.net/prashantptapase/hcracnsb/
Its urgent if you have solution then tell me
November 27, 2014 at 2:53 am #189335Paulie_D
MemberInteresting.
In Safari 5.1.7 the 22% is flexible when the viewport is resized but not in Chrome.
Not sure why that is…but I’m sure it could be found with a bit of searching.
However, I would not be using
margin-top
here…but rather justtop
.November 27, 2014 at 3:08 am #189336Prashant
Participant@Paulie_D: I already tried top tag. But no use. there is also minuet difference.
November 27, 2014 at 5:28 am #189354Paulie_D
MemberThen I can’t help….because it’s not clear to me what the overriding issue is.
top:22%
works so unless there is an actual issue you’re not covering I guess I don’t see the problem.November 27, 2014 at 5:43 am #189356Prashant
ParticipantWebsite link. check this site in both browser.
My problem.
1. Mouse hover is not working over the black strip of each product. (because of padding-top)
2. If i used margin-top then my hover problem solved but safari is not supporting to margin top.I think u got my problem?
November 27, 2014 at 6:07 am #189358Paulie_D
MemberIf you mean the
.Product-price-tag { position: absolute; width: 6.5%; margin-left: 15.7%; padding-top: 16.5%; z-index: 1; /* background-color: pink; */ }
that contains this image
Firstly, the parent element doesn’t have
position:relative
…I’m not sure why.Then you can position the image div
bottom:0; right:0
and you really don’t need margins at all.Frankly however, that image should be a background not an inline image.
I’m not sure what the “hover effect” is supposed to be.
- Chrome and safari both supports
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.