Moving a text widget with css
-
Hi, I’m trying to put a facebook icon at the top of my page. I uploaded the icon image in a post and linked it, then copied the html to a text widget. I’ve identified it as ‘text-4’ from this:
<div id=”text-4″ class=”widget widget_text”> <div class=”textwidget”><img src=”http://stampthewax.files.wordpress.com/2011/04/facebook4.jpg” alt=”” title=”Join us on Facebook” width=”29″ height=”29″ class=”alignnone size-full wp-image-122″ /></div>
</div>but it wont move when i try with top/left coordinates in css.
Any ideas?
The blog I need help with is: (visible only to logged in users)
-
You have to do it as follows. By setting #container to position relative it will keep the icon in the right place no matter whether someone is logged into wordpress or logged out. You then set #text-4 to position absolute and then use the left or right and top declarations. This puts the icon at the right end of the black bar at the top of your theme.
#container { position: relative; } #text-4 { position: absolute; top: 5px; right: 5px; } -
-
- The topic ‘Moving a text widget with css’ is closed to new replies.