English 中文(简体)
离开
原标题:Align two div s to left
  • 时间:2011-11-24 12:24:29
  •  标签:
  • html
  • css
  • web
最佳回答

这里试图:

http://jsfiddle.net/vaDCQ/

问题回答

这一缺陷显示了基本原理:。 http://jsfiddle.net/cA3su/。 但存在分歧。 一种情况是,“内部”四舍五入不至于像桌子那样。 而另一方面,你们需要了解浮动和清点工作。 它采取一些做法和实验。 简言之,四舍五入将永远无法准确操作表格。 但是,一旦你们知道如何做到这一点,就使你们失去了许多桌子。

你们可以通过浮动实现这一点。

你们可以使用这样的东西(基本例子):

html:

<div class="left-container">1</div>
<div class="right-container">
  <div class="number2">2</div>
  <div class="number3">3</div>
</div>

c :

.left-container{float:left;width:100px;}
.right-container{float:left;width:100px;}
.right-container .number2{float:left;width:100%;}
.right-container .number3{float:left;width:100%;}

下面是我的例子:。 http://jsfiddle.net/wQBq5/37/





相关问题
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!

热门标签