dimis283 — 2011-03-21T08:00:27-04:00 — #1
I have a div and I want if the text is sort (below 100 characters for example) to set it at the centre of this div.
How can I do that?
raffles — 2011-03-21T18:07:55-04:00 — #2
What do you mean by "centre"? Vertically? Horizontally? Both? It's hard to help you without some sample HTML.
paul_wilkins — 2011-03-21T19:05:23-04:00 — #3
I think he wants the text to be horizontally centered, but only if the text is short enough to fit on one line, that 100 characters he was mentioning.
It should only mean scripting the setting of a class name to the appropriate element.