ttocskcaj Posted May 5, 2012 Share Posted May 5, 2012 I'm trying to create styles/HTML for a news feed (similar to what you see on facebook etc). Here is the code that I have at the moment: #feed-list{ margin-top: 20px; } .feed-item{ display: block; } .feed-image{ width: 48px; height: 48px; display:inline; } .feed-user{ margin-right: 170px; font-size: 18px; line-height: 1.5em; text-decoration: none; color:#363636; } <ul id="feed-list"> <li class="feed-item"> <img class="feed-image" src="img/dummies/avatar.jpg" /> <div class="feed-content"> <h6 class="feed-user">ttocskcaj</h6> <span class="feed-text">New Topic: <a href="#">My awesome post!</a></span> </div> </li> </ul> This creates this: But what I want is this (The text is in line with the image). Any ideas? Quote Link to comment Share on other sites More sharing options...
haku Posted May 6, 2012 Share Posted May 6, 2012 .feed-image{ width: 48px; height: 48px; float:left; } Quote Link to comment Share on other sites More sharing options...
ttocskcaj Posted May 7, 2012 Author Share Posted May 7, 2012 Weird. I thought I already tried that :s But thanks. It worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.