English 中文(简体)
缩略语
原标题:CSS display table vs normal HTML Table

For some reason I need to display tabular data in my web application but not using native, semantic table, thead, tbody, th, td tags. I found CSS properties that make html elements "look"/"behave" like tables:

rel=“nofollow noreferer”> http://www.quirksmode.org/css/display.html

http://www.w3schools.com/cssref/pr_class_display.asp

http://developer.practicalebusiness.com/articles/1941-CSS-display-table-row-and-display-table-cell-

I ve tried out a small test, but can t figure out using least effort how to make a CSS table look like a native html table: http://jsfiddle.net/rniestroj/6Lyvm/ The columns completly do not align. Maybe I should somewhere apply display: table-column? But where?

或者,我是否需要更多的社会保障和自食其力,使之像原住民一样看待?

或者,我是否误解了,而不是1:1

Browser is 8.0b6.

最佳回答

The problem is with: .body and .footer divs. You don t assign style for them so they are rendered as "display: block" s and break your layout. I added "display: table-row-group;" to .body, and "display: table-footer-group;" to .footer. This fixed it.

例:

问题回答

暂无回答




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

热门标签