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

http://i.imgur.com/emrkjca.jpg

you can have size of div cut down less space , make postion:fixed moves scroll.

fiddle

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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -