Anyone can easily insert image and text on the same line using CSS Float. But I want to display Code ( Example - Facebook like box ) and text on the same line. Is it possible? How can I do this?
| SitePoint Sponsor |
Anyone can easily insert image and text on the same line using CSS Float. But I want to display Code ( Example - Facebook like box ) and text on the same line. Is it possible? How can I do this?

You do it in just the same way. For example, you put your code in a line like
<div class="code"> ...[code goes here]...</div>
and then in the CSS, you put
.code {float:left;}
There may be other, better ways of achieving the same effect, but it's difficult to say what would be best from what you've told us so far.
Any posts I write in Arial are on my mobile phone, so please excuse typos etc.
Any posts I write in Verdana are on a PC, so feel free to berate me mercilessly for any mistakes
Thanks a lot. It's working![]()
Bookmarks