css - Media Query Not Working With Larger Viewport Sizes -
i have set of social media icons @ top of sidebar: outtacontext. i'm having trouble positioning them in right place @ different viewport sizes. actually, it's working smaller viewports positioning off larger screens.
here's main css positioning:
#top #sidebar_bg .social_bookmarks { position: absolute; right: 69px; z-index: 152; margin-top: 102px; } @media screen , (max-width: 989px) , (min-width: 768px){ #top #sidebar_bg .social_bookmarks { right: 33px; margin-top: 65px; } }
for reason, larger screens icons appear centered within sidebar. media queries make adjust start adding problems.
can point me in right direction? thx.
first of all, i'm argentinean, forgive me english!
here's help...
the html markup is:
<div id="sidebar_bg"> <ul class="social_bookmarks"> <li class='twitter'> <a href='http://twitter.com/outtacontext'>follow on twitter</a> </li> <li class='facebook'> <a href='http://facebook.com/chamomileteaparty'>join our facebook group</a> </li> <li class='gplus'> <a href='https://plus.google.com/106461359737856957875/posts'>join me on google plus</a> </li> <li class='linkedin'> <a href='http://linkedin.com/jeffgates'>add me on linkedin</a> </li> <li class="rss"> <a href="http://www.outtacontext.com/wp2/feed/">rss</a> </li> <li class="flickr"> <a href="http://flickr.com/outtacontext">flickr</a> </li> </ul> </div>
the css styles:
#top #sidebar_bg { text-align: center; /* center on middle icons (acording #sidebar_bg width on every screen resolution */ } #top #sidebar_bg .social_bookmarks { display: inline-block; z-index: 152; margin-top: 102px; } @media screen , (max-width: 989px) , (min-width: 768px){ #top #sidebar_bg .social_bookmarks { margin-top: 65px; } }
alternative css - if want put right or left, , use media queries determine separation width 1 of sides, can use this:
#top #sidebar_bg { text-align: *****; /* right or left */ } #top #sidebar_bg .social_bookmarks { margin-*****: 40px; /* right or left */ display: inline-block; z-index: 152; margin-top: 102px; } @media screen , (max-width: 989px) , (min-width: 768px){ #top #sidebar_bg .social_bookmarks { margin-*****: 25px; /* right or left */ margin-top: 65px; } }
Comments
Post a Comment