13th
January
2011
WBR HTML Tag
posted in Programming, Tips |
The little known WBR tag is great for formatting HTML tables. Add it to specific places in your table cell values to give the browser the option to add a line break there. This is very useful when displaying tables with long strings that would otherwise cause horizontal scrolling.
Here’s a sample table, displaying some info. Since the values in the tables do not have spaces or tabs, the browser is forced to display the values on one line:
| Key | Value |
| ChinhDo.TestApp.TestClass.ExampleKey1 | this.is.an.example.of.a.very.long.string |
Here’s the same table, with <wbr/> tags inserted where periods are:
| Key | Value |
| ChinhDo. |
this. |
This entry was posted
on Thursday, January 13th, 2011 at 10:02 pm and is filed under Programming, Tips.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.