RE: limiting width of div (or other container) to width of text
by "Ann Ezzell" <amcbainezzell(at)alum.mit.edu>
|
| Date: |
Thu, 23 Jan 2003 07:05:19 -0700 |
| To: |
"'Gerhard Schoening'" <g.sch(at)onlinehome.de> |
| Cc: |
<hwg-style(at)hwg.org> |
| In-Reply-To: |
onlinehome |
| |
todo: View
Thread,
Original
|
|
Already tried that - it doesn't work either.
But thanks.
> -----Original Message-----
> From: Gerhard Schoening [mailto:g.sch(at)onlinehome.de]
> Sent: Thursday, January 23, 2003 12:03 AM
> To: Ann Ezzell
> Cc: hwg-style(at)hwg.org
> Subject: Re: limiting width of div (or other container) to
> width of text
>
> What you want is styling the H1, not the containing DIV. You
> might try
>
> In the HTML:
> <div id="headerBoxTraining"><h1>Header 1</h1></div>
>
> In the CSS:
> #headerBoxTraining {
> margin-top: 10px;
> }
>
> #headerBoxTraining H1 {
> border-top: 2px solid #cccccc;
> border-bottom: 2px solid #cccccc;
> border-right: 2px solid #cccccc;
> padding: 10px 5px 10px 0px;
> margin-top: 0px; /* because my normal H1 tag has a top margin */
> }
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.