English 中文(简体)
传真:版面文字和图像
原标题:HTML: layout text and image together
  • 时间:2011-10-19 14:48:41
  •  标签:
  • html
  • css

我需要有文字和图像,以便它们能够纵向地结合起来。 具体图像应在案文中垂直定位。 这样做的最佳方式是什么?

一项制约因素:我的>> 代码>和t;img> tag从外部来源检索,如果我能离开 代码><img> tag (无外在成分)。

样本:

<div>Some text <img src="http://somewhere.com/someimage.png"/></div>
问题回答

img{垂直: 中间;

最好在<条码>上添加<条码>。 虽然这将影响到所有<代码>mg 页 次

div{background:url(http://ts.com/aboutimage.png) 50% no-repeat; Line-hala:1.5em; text-align:center}

应当这样做。 取决于年龄大小





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签