views:

33

answers:

1

Hi experts,

I am using asp.net and C#.

I have a image and three line. Which I want to place like this

Like the one you can see in this below URL .

http://www.campaignmonitor.com/gallery/

Image is on the left side and parallel to image we can write text.

I know that the same can be acheived by HTML table / ASP.NET table like this

<table>
 <tr>
   <td>
    <img src="#"/>
   </td>
   <td>
    first line <br />
    second line <br/>
    third line <br />
   </td>
 </tr>
</table>

but my problem is that I can't use table, so please let me know how can i acheive the above task without using tables.

Might be or tag can do the trick. but I am really dumb in html. and I can't ever search the exact answer to my problem on google..

please let me know how to get this. It's urgent, your help or suggestion will help me a lot.

Thanks in advance.

+1  A: 

Using CSS, you can float the image to the left, which will cause the text to appear to the image's right.

For example, take the following:

<html>
<head><title>Example</title></head>
<body>
    <div style="float:left"> <!-- I've floated the div containing the image to the left -->
    <img src="http://www.google.com/images/srpr/nav_logo13.png"&gt;
    </div>
This is text that is to the right of the image. 
</body>
</html>
waiwai933
Absolute perfect .. :)thanks alot for your quick response ...work like miracle for me. Thanks again
Zerotoinfinite
With a class assigned to the image or via some other selector, you can float the image without wrapping it in a div. Also, while I am sure waiwai933 used inline styles for brevity, you are better off putting the styles in a stylesheet.
BJ Safdie
Zerotoinfinite
@Zero It works for me on Firefox. Do you have a link to a page where it's not working?
waiwai933
I am developing application on my local host, if it is working for you then might be there is some mistake in my html code. Let me check it. After some day I am going to deploy my site, if the issue reoccurs .. may i contact you at that time, so that you can provide your valuable feedback.Thanks.
Zerotoinfinite