View Full Version : Image Positioning Help - HTML/CSS
Trigs
01-03-2009, 07:13 AM
http://i41.tinypic.com/67kthj.jpg
How do I get the text to line up with the icon/image?
Ryzie
01-03-2009, 07:34 AM
Yea, this is a problem I've come across too. Easy solution:
Add this code to your IMG tags.
style="margin-bottom:-3px;"
Should work a treat.
Cushioned
01-03-2009, 09:51 AM
Maybe show us the code you're dealing with?
Kieran
01-03-2009, 11:04 AM
Make the menu in a div wrapper and then position that, so you should have something like this:
HTML:
<div id="redbar">
<div id="house">
</div>
<div id="home">
Home
</div>
</div>
Then your CSS would be this:
#redbar{
background-image:RED BAR IMAGE URL
width:X px;
height:X px;
margin-left:X px;
margin-top:X px;
float:left;
}
You would also have the same then for the icon but changing #redbar to #house
For the text it would be a similar setup aswell. You would just set the top and left margin to value that center the text where you want it.
I hope this helps :)
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.