css - Is this a good way to put scrolling social bar on my website? -
i'm coding own scrolling social bar i'm nut sure method i'm using. can see on pic above, had put wider grey div inside narrower content div. i've set grey's 1 css make it's z-index less content z-index. works ok , following content once scroll website question - method place bar this? maybe there easier solution , better browsers compatibility, isn't it?
sincerely, matt
you can have size of div
cut down less space , make postion:fixed
moves scroll.
html
<div id='div1' align='center'> <span id='grey'>like</span><br>tweet<br><span id='grey'>share</span> </div> <div id='div2' align='center'>content</div>
css
#div1 { position:fixed; top:30px; left:5px; background:yellow; height:60px; width:50px; border:4px ridge black; } #div2 { height:800px; width:200px; background:orange; margin-left:60px; } #grey { background:grey; }
Comments
Post a Comment