Version: 3.5.3 (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.16 I defined a css style element table {display:inline}. However tables are displayed with a linebreak after. Here is an exmaple (XHTML/CSS cheked): =================================================================== <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <style type="text/css"> body {text-align:center} table {display:inline} img {margin:1em;padding:0em;border-style:solid;border-width:1em;border-color:rgb(250,240,230)} </style> <title> 2006-06-22-Ustron </title></head><body> <hr /> <table> <tr> <td> <a href='IMG_1319.JPG' ><img height='75' src='_IMG_1319.JPG' alt='IMG_1319.JPG' title='IMG_1319.JPG (1416600 bytes)' /></a> </td></tr><tr> <th> IMG_1319.JPG<br />(1416600 bytes)</th></tr></table> <table> <tr> <td> <a href='IMG_1321.JPG' ><img height='75' src='_IMG_1321.JPG' alt='IMG_1321.JPG' title='IMG_1321.JPG (1217626 bytes)' /></a> </td></tr><tr> <th> IMG_1321.JPG<br />(1217626 bytes)</th></tr></table> <hr /> </body></html> ==================================================================================
You can't set a table inline. You might want to try display: inline-table Of course you might argue that we should have the _quirk_ where we rewrite attempts to set tables inline to inline-table. I know Safari does this, but I am unsure how it is handled by other browsers.
Why I can not set a table inline? I checked CSS by W3C CSS checker, it found it correct. 'inline-table' works fine, without linebreaks. However I noticed that Firefox displays 'inline-table' in incorrect way: with linebreak after. I tried 'inline'. Firefox displays table without linebreak, but Konqueror does. Since I use Konqueror, my wife prefers Firefox, I decided to report bugs to both browsers:-).
Well actually if you interpret it strictly a TABLE with inline display cannot contain table-section or table-rows, because inline elements can only contain other inline elements or text. You need to have a table or inline-table to have something to put table-content into. Funny that Firefox supports inline-table only when declared quirky. Can you test with IE?
Well, I agree with your argument, I will leave 'inline-table' in my html. So, may I submit it not as a bug, but as a wish for Konqueror team. I am still waiting for an account to submit a bug to Gecko/Firefox. I can not check with IE. I don't have any.
SVN commit 604496 by carewolf: Rewrite display:inline on TABLE to display:inline-table A quirk Dirk left out ages ago, but it looks like we need it BUG: 136240 BUG: 129671 CCBUG: 107336 M +2 -2 cssstyleselector.cpp --- branches/KDE/3.5/kdelibs/khtml/css/cssstyleselector.cpp #604495:604496 @@ -633,8 +633,8 @@ style->setDisplay(TABLE_CELL); style->setFloating(FNONE); } -// else if (e->id() == ID_TABLE) -// style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE); + else if (e->id() == ID_TABLE) + style->setDisplay(style->isDisplayInlineType() ? INLINE_TABLE : TABLE); } // Table headers with a text-align of auto will change the text-align to center.
*** Bug 137505 has been marked as a duplicate of this bug. ***
This is still a problem in 3.5.8. When may we expect to see the fix?
Created attachment 22843 [details] table illustrating behaviour of vertical-align as applied to tables with display:inline
Once display:inline is fixed, the next question is, does vertical-align behave properly? Please refer to the attached table, which is also available at http://www.zipcon.net/~swhite/docs/computers/browsers/table_vertical_align.html
re#7: The testcase is broken. It bears a strict doctype but uses a quirk (display:inline is not the same as display:inline-table no matter how many browsers get it wrong). Quirks, as logic demand, only work in quirkmode. > the next question is, does vertical-align behave properly? once the testcase is fixed, assuming the text in green does describe the proper behaviour, which I have no time to double-check, then it is all fine, with the possible exception of vertical-align: sub, which expected behaviour isn't described, but doesn't look consistent with what we are doing with sup.