Previous Message
Next Message

The captions! The captions! AUGH!!!!!

Sent by Marcluzietti on 30 March 2006 21:09

"Pringle, Ron" [EMAIL-REMOVED]>
03/30/2006 03:26 PM

        To:     [EMAIL-REMOVED]>, [EMAIL-REMOVED]>
        Subject:        RE: [css-d] The captions! The captions! AUGH!!!!!

Marc wrote:

> The code below generates a header on the top-left of the 
> table. The text
> in the <p> element, however, rolls up into a ball on the 
> other end of the 
> table.
> It should start right under the heading. I've tried giving a 
> width:auto 
> and the
> holly hack, but to no avail. I've tried floating it. 
> I think this is all the relevant code.
> <div>
>         <table>
>                 <caption>
>                 <h2>Test Results:</h2>
>                 <p>Calculated Closing Costs: <%jsp stuff%></p>
>                 </caption>


I could be wrong as I haven't taken the time to consult the proper
sources, but I don't believe the caption can contain headers and
paragraph tags. You should instead style the caption directly.


<caption>Test Results: Calculated Closing Costs: xxxxx</caption>

And then write your rules as:

caption {
whateveryouwant: value;

Styling tables in general and captions in particular can be a bit odd if
you don't understand exactly how captions work as part of the structure
of the table.

Perhaps the following page will be of some help though.



The caption element may contain any body content, like a table cell can, 
according to 
"HTML & XHTML: The Definitive Guide," 4th Ed. O'Reilly.

Marc Luzietti
Flagship Project
Bayview Financial, L.P.
(305) 341-5624
css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread:

Possibly related: