i have this part of html in my view:
<div class="info">
<img width="52" height="52" alt="Avatar" src="/ThemeFiles/Base/images/User/user-avatar.png"/>
</div>
<ul class="links">
<li>
<%: newsItem.CommentDate %>
</li>
<li>
<%: ViewBag.UserName %>
</li>
</ul>
i have my avatar showing with the newsItem.CommentDate and ViewBag.UserName underneath the avatar. How can i get the date and username to display NEXT TO the avatar??
thanks
This is one way:
You might have to do some tweaking, though, if you want them to line-up in a certain way (one way being to give
ul.linksa fixedheight, along with somepadding-top.You can also use
float: leftin place ofdisplay:inline-blockfor browsers that don’t understand it.With
floats, though, you then have to consider what happens to elements following them – withinline-blockelements you don’t.