English 中文(简体)
a. 向社会保障局提供2X5表格?
原标题:Making a 2X5 table with CSS?
  • 时间:2011-08-01 19:57:14
  •  标签:
  • css

我基本上需要一个表,其中一栏占封套的30%,第二栏占其余70%。 我倾向于提出一个表格,但我认为,现在还不是恰当的。

增 编

最佳回答

您可以简单地使用<代码><col /> tag(用于打字栏目),并应用CSS代码<>width 给它的财产:working example

问题回答

表格完全正确,适合表格数据。 表中的顺序。 没有必要就此与特别安全局一道提出一个表格。

如果你重新显示数据,则使用<代码><table>。 采用这种技术进行布局是不适当的,但用它来获取数据比与安保部建立一个表格更合适。

<table style="width:100%">
<tr>
<td style="width:30%">your text here</td>
<td>other text here</td>
</tr>
...
</table>

If you actually need 5x2 cells formatted like a table, making a div equivalent would certainly take longer. I m not entirely sure about the , though. But if it works, the second should be 70% without overflow on the right because of the borders, margins, and padding.

如果是数据表,那么<代码><table>tag仍然是正确的解决办法。

The concept of "tableless design" only applies to the practice of using tables to do the layout (eg a table column for the right hand menu bar and another for the main page body). This is bad practice, and should no longer be done; for this kind of layout, <div> elements and CSS are a better solution.

However if the content you wish to display is actually a table of data, then you should still be using the <table> tag.

事实上,“不可靠的设计”这一短语本身是坏的短语,因为它确实造成你重新产生的混淆。

A better way of saying it is "semantic design". Semantic means using elements and class names which make logical sense, so that if a search engine or other scanning program reads your page, it can understand what type of content it is seeing at by looking at the tags. Therefore a <table> element is good for tables of data because it is logical, but if a navigation menu is in a <table> it doesn t make sense.

希望会有所帮助。





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

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

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 ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签