|
Posted by a-ok-site on 11/17/07 01:23
On Nov 16, 6:45 pm, "asdf" <a...@asdf.com> wrote:
> "charlbury" <st...@dvd.co.uk> wrote in message
>
> news:a85ad2eb-0c88-4595-b8f5-0e56dd125060@i37g2000hsd.googlegroups.com...
>
>
>
> > Hi, I'm having trouble with CSS white space. With the code at the
> > bottom of this post I expect the following output:
>
> > Search
> > Your Options
> > Footer
>
> > But I get the following output:
>
> > Search
>
> > Your Options
>
> > Footer
>
> > I get a line or white space between each section. Can anyone tell me
> > where I am going wrong?
>
> > Thanks
>
> > <pre>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/
> > xhtml1-transitional.dtd">
> > <html><head><title>Left Nav Bar Test</title>
>
> > <style type="text/css">
>
> > body {
> > margin: 0px 0px 0px 0px;
> > font-family: arial, verdana, tahoma, sans-serif;
> > font-size: 12px;
> > text-align: left;
> > background-color: #efefff;
> > }
>
> > #contentleft {
> > width: 162px;
> > float: left;
> > }
>
> > .frameheader {
> > background-color: yellow;
> > }
>
> > .framebody {
> > background-color: white;
> > }
>
> > .framefooter {
> > background-color: red;
> > }
>
> > h1 {
> > font-size: 12px;
> > }
> > </style>
>
> > </head>
> > <body>
>
> > <div id="contentleft">
> > <div class="frameheader">
> > <h1>Search</h1>
> > </div>
>
> > <div class="framebody">
> > <h1>Your Options</h1>
> > </div>
>
> > <div class="framefooter">
> > <h1>footer</h1>
> > </div>
> > </div>
>
> > <br clear="all" />
>
> > </body>
> > </html>
> > </pre>
>
> I think the space you describe has probably got more to do with the default
> rendering of h1 by browsers...
>
> You could try modifying your css so that:
>
> h1 {
> font-size: 12px;
> margin:0; <-- new bit
>
>
>
>
>
> }
Thanks a lot because I have had that little aggravation for some time,
and I patched it with a div and background to match.
a-ok-site
Navigation:
[Reply to this message]
|