Reputation: 99
I was trying to put text in front of an image and what happened is that the text makes an paragraph without my order.
The code in HTML i'm using is:
<div id="userminidata">
<div id="userminiinfo"><img id="userminipic" src="images/minipic.png">
<span>(User name)</span> <span class="separadorverde">|</span> <span>Definições de Conta</span> <span class="separadorverde">|</span> <span>Sair</span>
</div>
</div>
The CSS code:
#userminidata{
float:right;
margin: center;
height: 50px;
width: 250px;
margin-top: 13px;
}
#userminipic {
width: 30px;
height: 30px;
vertical-align: middle;
}
#userminiinfo {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #8b8b8b;
font-style:normal;
}
.separadorverde{
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #93b55a;
font-weight:bold;
}
At least the screenshot of what is happening: http://www.imgftw.net/img/692260808.jpg
Upvotes: 0
Views: 60
Reputation: 5681
The picture looks like the normal behavior of your html and css. I don't see something like a paragraph anywhere.
Upvotes: 0
Reputation: 6960
I'm not entirely sure that I understand your question - but I think your source order is wrong. If you want the text to appear before the image, the image shouldn't be the first item in the <div>
.
Upvotes: 0
Reputation: 626
Width of #userminidata is only 250px and that isn't enought.
Try
#userminidata
{
width:300px; /*or more*/
}
Upvotes: 1