0

I have one difficulty. I have to put text on table border as a header. For example:

--------------This Is header-----------------------

Is it possible, if anybody can provide solution on this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Ankush Rasse
  • 11
  • 1
  • 6

1 Answers1

3

There are multiple ways.

You could create a table header, and set the text position: relative and move it up a bit. Though, this is not classy.

I would use a fieldset instead, which is 100% valid. You need to give the fieldset a border instead of the table though.

<fieldset>
    <legend>Your text</legend>

    <!-- table goes here -->
</fieldset>
Tim S.
  • 13,597
  • 7
  • 46
  • 72
  • I tried this but failed in some way. Meanwhile I want rounded corner for this table. How can I achieve this – Ankush Rasse Jan 18 '13 at 09:54
  • hi, Is there is any solution to achieve this with rounded corner? If any other way then provide me? – Ankush Rasse Jan 21 '13 at 05:10
  • Just apply your CSS rules for your border to your fieldset instead of your table... http://www.border-radius.com – Tim S. Jan 22 '13 at 10:54
  • Thanks for your valuable reply.Its working perfectly now. great Man – Ankush Rasse Jan 23 '13 at 05:52
  • You can mark an answer correct by clicking the "V" left of an answer. It will allow people to find this answer more easily, and people will answer your future questions faster. – Tim S. Jan 23 '13 at 13:19