开发者

Image along with text in HTML, asp.net

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 <span> or开发者_开发技巧 <div> 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..


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">
    </div>
This is text that is to the right of the image. 
</body>
</html>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜