Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using CSS, setting div class to drop to another line?

Tags:

css

Using CSS, can I set a div class to some text on a paragraph to drop it to the line below?

I tried float: left; and it moved the text to the beginning of the paragraph which is a good start as I would want the text on the left, but I need it on the line below.

Here's the HTML:

<div class="tweet">
<ul class="tweet_list">
<li class="tweet_odd">
<span class="tweet_text">This is a tweet</span>
<span class="tweet_time">1 minute ago</span>
</li>
</ul>
</div>

Thanks

like image 798
Tim Avatar asked Jan 19 '23 15:01

Tim


1 Answers

Add this to the div you want to drop below, it may do the trick:

 <div style="clear: both;">
  • Inline css is not optimal way though, this would be better done in a style-sheet.
like image 87
stefgosselin Avatar answered Jan 29 '23 08:01

stefgosselin