I have following code:
<table>
<tr>
<td>Table 1</td>
</tr>
</table>
<table>
<tr>
<td>Table 2</td>
</tr>
</table>
Very unfortunately, a line break is inserted between these two tables. I have tried putting them both in a single span and setting the whitespace to nowrap, but at no avail. Please, could you tell me how I can simply put these elements in a single row, without setting the float attribute in CSS and without surrounding each table with a <td> {table} </td>
and then putting this in a table row.
Thanks a lot in advance. I have asked Google, but it just wouldn't say anything ^^ StackOverflow remained silent so far, too
There are several ways to prevent line breaks in content. Using is one way, and works fine between words, but using it between an empty element and some text does not have a well-defined effect. The same would apply to the more logical and more accessible approach where you use an image for an icon.
If you want to prevent the text from wrapping, you can apply white-space: nowrap; Notice in HTML code example at the top of this article, there are actually two line breaks, one before the line of text and one after, which allow the text to be on its own line (in the code).
You can insert line breaks in HTML with the <br> tag, which is equivalent to a carriage return on a keyboard.
Instead of using the <br> tag, you should use a semantic HTML element and the CSS margin or padding properties if necessary.
I found it!
One has to use the following settings for both tables:
display: inline-table;
Thanks for the inline, guys, thanks a lot, but at least, inline-table works ^^
Hope I helped...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With