Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Hey guys it a bit hard for me to explain, but I'll try as best I can. I have a sharing div on my side

<div class="share">

And I want to fixe it in the center of the screen top:50% on left of the image. I tried many css thing but no success.

here's the webpage http://giantgag.com/?p=10272

It doesn't work with all screen resolution. The sharing buttons goes over the image

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
210 views
Welcome To Ask or Share your Answers For Others

1 Answer

Actually the css is working fine. top:50% keeps the top point of div at 50% distance from top which is what you are seeing in your site.
For correct solution irrespective of any screen size, use javascript to give the position to div at onload.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...