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? Link to comment https://forums.phpfreaks.com/topic/262110-css-for-news-feed/ 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; } Link to comment https://forums.phpfreaks.com/topic/262110-css-for-news-feed/#findComment-1343507 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. Link to comment https://forums.phpfreaks.com/topic/262110-css-for-news-feed/#findComment-1343660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.