This is a discussion on How do I stop text wrapping around an image using CSS style? I'm building a within the Blog Theme Talk forums, part of the News and Announcements category; WordPress theme.? I would like to stop text flowing underneath the thumbnail image on this page (GIF) http://www.onepagereview....
| |||||||
| Members List | Mark Forums Read |
|
#1
| |||
| |||
| WordPress theme.? I would like to stop text flowing underneath the thumbnail image on this page (GIF) http://www.onepagereview.com/blog/wp-content/themes/Restaurant%20Review/images/working2.gif Please help. >> This is the CSS applied to the 'thumb' .thumb { float: left; margin-left:5px; margin-top:4px; margin-right:25px; background-color: #fff; white-space:nowrap; } >> This is the HTML (WordPress) <div class="thumb"><a href="<?php the_permalink() ?>"><?php post_image(); ?></a></div> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> ...etc Thank you |
|
#2
| ||||
| ||||
| Hi there, it will depend on how long your posts will be, if they are all going to be short like in the example screenshot pic you posted, then you can try adding a margin-bottom to the .thumb class, like: .thumb { float: left; margin-left:5px; margin-top:4px; margin-right:25px; margin-bottom: 25px; background-color: #fff; white-space:nowrap; } but this won't work for very long posts, so you would have to either use tables or some other CSS trick for example, if you set both .thumb and .post to float: left AND specify a width for both divs, that would work .thumb { float: left; width: 100px } .post { float: left; width: 300px } |
![]() |
| Thread Tools | |
| Display Modes | |
| |