How can I remove the newline after text in a h1 tag? The text is in a table cell all by itself and there is a huge space under the h1 text that I want to remove. How can this be done?
| SitePoint Sponsor |
How can I remove the newline after text in a h1 tag? The text is in a table cell all by itself and there is a huge space under the h1 text that I want to remove. How can this be done?





In your CSS file, try...
not sure if it has both padding and a margin off hand, but I presume it probably does.Code:h1 { padding: 0px; margin: 0px; }
Although just to throw another idea into the potHave you considered applying it to the cell/table itself? Rather than around the text.
Originally posted by keithd
How can I remove the newline after text in a h1 tag? The text is in a table cell all by itself and there is a huge space under the h1 text that I want to remove. How can this be done?h1 is a block-level element though. I'd put your inline text within a <span> styled a certain way rather than in an h1 tag. It has more semantic meaning that way.Code:<style type="text/css"> h1 { display:inline; } </style>
--Vinnie





Not if Keith's actually using <h1> to designate the main headline. <span> doesn't really have any meaning at all. :-)Originally posted by vgarcia
I'd put your inline text within a <span> styled a certain way rather than in an h1 tag. It has more semantic meaning that way.
~~Ian
That's what I meant, if his h1 is all for presentation and not for any particular meaning he should use a <span>, as it has no real meaning like you said.Originally posted by Ian Glass
Not if Keith's actually using <h1> to designate the main headline. <span> doesn't really have any meaning at all. :-)
~~Ian
--Vinnie
Bookmarks