CSS White Space - margin and padding question
CSS White Space - margin and padding question
am 17.11.2007 01:42:28 von charlbury
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
Left Nav Bar Test
Re: CSS White Space - margin and padding question
am 17.11.2007 01:44:25 von charlbury
Sorry, the code above does not have the
and
tags around
it. I though I needed this to post the unformatted html.
Re: CSS White Space - margin and padding question
am 17.11.2007 01:45:32 von 23s
"charlbury" wrote in message
news:a85ad2eb-0c88-4595-b8f5-0e56dd125060@i37g2000hsd.google groups.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
>
>
>
> Left Nav Bar Test
>
>
>
>
>
>
>
>
>
>
>
Your Options
>
>
>
>
>
>
>
>
>
>
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
}
Re: CSS White Space - margin and padding question
am 17.11.2007 02:19:33 von lws4art
charlbury wrote:
> Hi, I'm having trouble with CSS white space. With the code at the
> bottom of this post I expect the following output:
>
>
>
>
>
Your Options
>
>
>
>
It's a margins setting as you have been told, but how can your page have
*more than one* level one header?
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: CSS White Space - margin and padding question
am 17.11.2007 02:23:18 von a-ok-site
On Nov 16, 6:45 pm, "asdf" wrote:
> "charlbury" wrote in message
>
> news:a85ad2eb-0c88-4595-b8f5-0e56dd125060@i37g2000hsd.google groups.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
>
> >
> >
> > Left Nav Bar Test
>
> >
>
> >
> >
>
> >
> >
>
> >
> >
Your Options
> >
>
> >
> >
>
> >
>
> >
> >
> >
>
> 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
Re: CSS White Space - margin and padding question
am 17.11.2007 03:26:26 von Richard
On Fri, 16 Nov 2007 20:19:33 -0500, Jonathan N. Little wrote:
> charlbury wrote:
>> Hi, I'm having trouble with CSS white space. With the code at the
>> bottom of this post I expect the following output:
>
>>
>>
>>
>>
>>
Your Options
>>
>>
>>
>>
>
> It's a margins setting as you have been told, but how can your page have
> *more than one* level one header?
because I told it to, dipshit.
The header is nothing more than a fixed font size. No rules say you can use
it only once.
Re: CSS White Space - margin and padding question
am 17.11.2007 05:38:33 von lws4art
richard wrote:
> On Fri, 16 Nov 2007 20:19:33 -0500, Jonathan N. Little wrote:
>> It's a margins setting as you have been told, but how can your page have
>> *more than one* level one header?
>
> because I told it to, dipshit.
> The header is nothing more than a fixed font size. No rules say you can use
> it only once.
Excuse me? No, a heading is a *heading* not a header, and it does have
semantic meaning, I guess you had trouble with outlines when you did
your research papers in school, eh?
H# elements are used for the hierarchal headings in a document, and
should not be used to format the font size of some text. That is what
CSS is for...
..special { font-size: 1.5em; font-weight: bold; ... }
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: CSS White Space - margin and padding question
am 17.11.2007 10:43:20 von Ben C
On 2007-11-17, Jonathan N. Little wrote:
> richard wrote:
>> On Fri, 16 Nov 2007 20:19:33 -0500, Jonathan N. Little wrote:
>
>>> It's a margins setting as you have been told, but how can your page have
>>> *more than one* level one header?
>>
>> because I told it to, dipshit.
>> The header is nothing more than a fixed font size. No rules say you can use
>> it only once.
>
>
> Excuse me? No, a heading is a *heading* not a header, and it does have
> semantic meaning, I guess you had trouble with outlines when you did
> your research papers in school, eh?
>
> H# elements are used for the hierarchal headings in a document, and
> should not be used to format the font size of some text. That is what
> CSS is for...
>
> .special { font-size: 1.5em; font-weight: bold; ... }
Even if headings are supposed to be strictly hierarchical, you could
still have two top level headings in a document-- just two trees of
headings side by side. You would need another rule like XML's
requirement of having exactly one root element per document.
Re: CSS White Space - margin and padding question
am 17.11.2007 13:03:22 von jkorpela
Scripsit charlbury:
> Sorry, the code above does not have the
and
tags around
> it. I though I needed this to post the unformatted html.
You should quote or paraphrase what you are commenting on, even when you
comment on yourself.
You should not apologize for lack of and
tags since they should
not be included and would not help anything. You should apologize for not
including a URL.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: CSS White Space - margin and padding question
am 17.11.2007 13:07:12 von jkorpela
Scripsit charlbury:
> Hi, I'm having trouble with CSS white space.
Stop worrying about that. Learn the elements of the basics of HTML first.
> font-family: arial, verdana, tahoma, sans-serif;
> font-size: 12px;
And later, read a decent tutorial on CSS before creating the usual crap of
thoughtless CSS code. Anyone who has read such a tutorial knows from the two
lines above that it makes little sense to try to help you with CSS issues
before you are willing to forget what you thought you knew about it and
start actually _learning_ how to use CSS.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: CSS White Space - margin and padding question
am 17.11.2007 19:48:40 von a-ok-site
On Nov 17, 6:07 am, "Jukka K. Korpela" wrote:
> Scripsit charlbury:
>
> > Hi, I'm having trouble with CSS white space.
>
> Stop worrying about that. Learn the elements of the basics of HTML first.
>
> > font-family: arial, verdana, tahoma, sans-serif;
> > font-size: 12px;
>
> And later, read a decent tutorial on CSS before creating the usual crap of
> thoughtless CSS code. Anyone who has read such a tutorial knows from the two
> lines above that it makes little sense to try to help you with CSS issues
> before you are willing to forget what you thought you knew about it and
> start actually _learning_ how to use CSS.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
W3C CSS Validator Results for http://www.cs.tut.fi/~jkorpela/
Re: CSS White Space - margin and padding question
am 17.11.2007 19:53:53 von a-ok-site
On Nov 17, 6:07 am, "Jukka K. Korpela" wrote:
> Scripsit charlbury:
>
> > Hi, I'm having trouble with CSS white space.
>
> Stop worrying about that. Learn the elements of the basics of HTML first.
>
> > font-family: arial, verdana, tahoma, sans-serif;
> > font-size: 12px;
>
> And later, read a decent tutorial on CSS before creating the usual crap of
> thoughtless CSS code. Anyone who has read such a tutorial knows from the two
> lines above that it makes little sense to try to help you with CSS issues
> before you are willing to forget what you thought you knew about it and
> start actually _learning_ how to use CSS.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
DOH.....first post link was cut off....grrrr
W3C CSS Validator Results for
http://www.cs.tut.fi/~jkorpela/
> "start actually _learning_ how to use CSS."
LMAO......Maybe, validate before making a statement like previous!!!
Re: CSS White Space - margin and padding question
am 17.11.2007 19:56:44 von a-ok-site
On Nov 17, 6:07 am, "Jukka K. Korpela" wrote:
> Scripsit charlbury:
>
> > Hi, I'm having trouble with CSS white space.
>
> Stop worrying about that. Learn the elements of the basics of HTML first.
>
> > font-family: arial, verdana, tahoma, sans-serif;
> > font-size: 12px;
>
> And later, read a decent tutorial on CSS before creating the usual crap of
> thoughtless CSS code. Anyone who has read such a tutorial knows from the two
> lines above that it makes little sense to try to help you with CSS issues
> before you are willing to forget what you thought you knew about it and
> start actually _learning_ how to use CSS.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
DOH.....first post link was cut off....grrrr
W3C CSS Validator Results for
http://jigsaw.w3.org/css-validator/validator?profile=css21&w arning=0&uri=http%3A%2F%2Fwww.cs.tut.fi%2F~jkorpela%2F
> "start actually _learning_ how to use CSS."
LMAO......Maybe, validate before making a statement like previous!!!
Re: CSS White Space - margin and padding question
am 17.11.2007 20:35:24 von jkorpela
Scripsit a-ok-site:
> DOH.....first post link was cut off....grrrr
Don't worry, you already ridiculed yourself in public. No wonder you write
anonymously.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: CSS White Space - margin and padding question
am 17.11.2007 20:41:04 von a-ok-site
On Nov 17, 1:35 pm, "Jukka K. Korpela" wrote:
> Scripsit a-ok-site:
>
> > DOH.....first post link was cut off....grrrr
>
> Don't worry, you already ridiculed yourself in public. No wonder you write
> anonymously.
>
> --
> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
People like you are why I hate groups. Just because something else
was going on and I was not paying attention DOES NOT MEAN I RIDICULED
MYSELF: however, you did! About the anonymous crap, I am one of the
few that actually has a real profile. Do you.... From the way people
have acted since I joined this group, and not just towards me, I can
live without it.
Re: CSS White Space - margin and padding question
am 17.11.2007 21:04:02 von a.nony.mous
a-ok-site wrote:
> .. I am one of the few that actually has a real profile.
That sounds like a Google Group thing...
This isn't Google Groups, you know, it's Usenet, and all we need is a
news reader and a news service. ;-)
--
-bts
-Motorcycles defy gravity; cars just suck
Re: CSS White Space - margin and padding question
am 17.11.2007 21:40:03 von Bone Ur
Well bust mah britches and call me cheeky, on Sat, 17 Nov 2007 19:41:04
GMT a-ok-site scribed:
>> > DOH.....first post link was cut off....grrrr
>>
>> Don't worry, you already ridiculed yourself in public. No wonder you
>> write anonymously.
>>
>> --
>> Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
>
> People like you are why I hate groups.
Even The Doobie Brothers?
> Just because something else
> was going on and I was not paying attention DOES NOT MEAN I RIDICULED
> MYSELF: however, you did! About the anonymous crap, I am one of the
> few that actually has a real profile. Do you....
Probably when he turns sideways to the light source....
> From the way people
> have acted since I joined this group, and not just towards me, I can
> live without it.
Whinny kids do not exactly enhance my living experience, either.
--
Bone Ur
Cavemen have formidable pheromones.
Re: CSS White Space - margin and padding question
am 18.11.2007 13:39:48 von Toby A Inkster
Ben C wrote:
> Even if headings are supposed to be strictly hierarchical, you could
> still have two top level headings in a document-- just two trees of
> headings side by side.
Something like...
h1. Cats & Dogs
h2. Cats
h3. Siamese cats
h3. Tabby cats
h2. Dogs
h3. Greyhounds
h3. Beagles
h1. Fish
h2. Sharks
h3. Hammerhead sharks
h2. Cod
h2. Sardines
But one could argue that the two h1-level headings should in fact be h2:
h1{display:none}. Good Pets to Keep
h2. Cats & Dogs
h3. Cats
h4. Siamese cats
h4. Tabby cats
h3. Dogs
h4. Greyhounds
h4. Beagles
h2. Fish
h3. Sharks
h4. Hammerhead sharks
h3. Cod
h3. Sardines
That is, there can only be one
element for the page, so there
should only ever be one element, which should roughly correspond with
it. (It is often useful to include context information in the title, such
as the name of the collection of documents to which this document belongs.)
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 11 days, 19:36.]
[Now Playing: ./counting_crows/millers_angels_demo.ogg.]
Belgium
http://tobyinkster.co.uk/blog/2007/11/17/belgium/
Re: CSS White Space - margin and padding question
am 18.11.2007 16:07:01 von lws4art
Toby A Inkster wrote:
> Ben C wrote:
>
>> Even if headings are supposed to be strictly hierarchical, you could
>> still have two top level headings in a document-- just two trees of
>> headings side by side.
>
> Something like...
>
> h1. Cats & Dogs
> h2. Cats
> h3. Siamese cats
> h3. Tabby cats
> h2. Dogs
> h3. Greyhounds
> h3. Beagles
> h1. Fish
> h2. Sharks
> h3. Hammerhead sharks
> h2. Cod
> h2. Sardines
>
> But one could argue that the two h1-level headings should in fact be h2:
>
> h1{display:none}. Good Pets to Keep
> h2. Cats & Dogs
> h3. Cats
> h4. Siamese cats
> h4. Tabby cats
> h3. Dogs
> h4. Greyhounds
> h4. Beagles
> h2. Fish
> h3. Sharks
> h4. Hammerhead sharks
> h3. Cod
> h3. Sardines
>
> That is, there can only be one
element for the page, so there
> should only ever be one element, which should roughly correspond with
> it. (It is often useful to include context information in the title, such
> as the name of the collection of documents to which this document belongs.)
>
I agree with this that there should be only on H1 per page, but the HTML
Gods will not strike you dead if you using more than one (but if you do
it should make logical sense) What I object to is the use of H# to
"style" with. In other words using H# where the text is not a heading
but where the author merely wants bigger bolder text!
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: CSS White Space - margin and padding question
am 18.11.2007 20:23:35 von dorayme
In article <4812a$47405512$40cba7a3$21291@NAXS.COM>,
"Jonathan N. Little" wrote:
> Toby A Inkster wrote:
> > Ben C wrote:
> >
> >> Even if headings are supposed to be strictly hierarchical, you could
> >> still have two top level headings in a document-- just two trees of
> >> headings side by side.
> >
> > That is, there can only be one element for the page, so there
> > should only ever be one element, which should roughly correspond with
> > it. (It is often useful to include context information in the title, such
> > as the name of the collection of documents to which this document belongs.)
> >
>
> I agree with this that there should be only on H1 per page, but the HTML
> Gods will not strike you dead if you using more than one (but if you do
> it should make logical sense) What I object to is the use of H# to
> "style" with. In other words using H# where the text is not a heading
> but where the author merely wants bigger bolder text!
Yes, to use it to get the font-size you want for a bit of text is
altogther wrong. But back to the question of the headings as
logical structure, it depends on the material in the page whether
you argue one way or another, to stick to 'only one h1 per page'
is a policy decision that is good for the most part. There is the
question whether it is always needed to use an h1, it could be
implied by the context, it may not need to be stated, the page
goes straight to h2s and down for different strands under the
unstated h1. (I think that possibility is what Toby was implying
by his h1 {display: none}".
On the other hand, it could be that his example is a little too
favourable to the "only one h1 per page" policy. You can be
struck by the reference of the page itself to guide you, in which
you will always find an h1 (stated or implied) or you can be
guided by the material under the heading, and you want a really
meaningful heading for it, no less than an h1 doing it justice.
--
dorayme
Re: CSS White Space - margin and padding question
am 19.11.2007 00:25:00 von Toby A Inkster
dorayme wrote:
> unstated h1. (I think that possibility is what Toby was implying
> by his h1 {display: none}".
I meant to imply that the h1 is there for semantic and structural reasons,
but CSS is used to hide it.
It may be that the main heading is obvious to all who come to the page, so
there is no benefit in showing it to the visitor, yet I still think there
should be a main heading, even if you hide it with CSS for those reasons.
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 12 days, 6:20.]
USD/EUR Exchange Rate Graph
http://tobyinkster.co.uk/blog/2007/11/18/usd-eur/
Re: CSS White Space - margin and padding question
am 19.11.2007 03:28:43 von dorayme
In article ,
Toby A Inkster wrote:
> dorayme wrote:
>
> > unstated h1. (I think that possibility is what Toby was implying
> > by his h1 {display: none}".
>
> I meant to imply that the h1 is there for semantic and structural reasons,
> but CSS is used to hide it.
>
> It may be that the main heading is obvious to all who come to the page, so
> there is no benefit in showing it to the visitor, yet I still think there
> should be a main heading, even if you hide it with CSS for those reasons.
It is something I have been thinking for a while and have now and
then just had h2s or two or more h1s for very separate sections
of a page. I either worried that there was no h1 or too many!
But, of course, you can or should stick it in but not necessarily
display it. Thanks for drawing attention to this possibility.
--
dorayme
Re: CSS White Space - margin and padding question
am 19.11.2007 06:09:09 von Bone Ur
Well bust mah britches and call me cheeky, on Mon, 19 Nov 2007 02:28:43
GMT dorayme scribed:
> In article ,
> Toby A Inkster wrote:
>
>> dorayme wrote:
>>
> But, of course, you can or should stick it in but not necessarily
> display it. Thanks for drawing attention to this possibility.
No - thank YOU.
--
Bone Ur
Cavemen have formidable pheromones.
Re: CSS White Space - margin and padding question
am 19.11.2007 12:59:39 von Andy Dingley
On 17 Nov, 09:43, Ben C wrote:
> Even if headings are supposed to be strictly hierarchical, you could
> still have two top level headings in a document
I've not checked this in the standard, but I don't believe so.
Under W3C HTML (the only real sort) there's no restriction on
hierarchy or ordering of at all. Do whatever you like.
Under the bizarre aberrant ISO HTML (which I intend to ignore rather
than dissecting), the require both strict hierarchies _and_ a single
as a root.
So it's either very loose, or very strict. There's nothing in the
middle where hierarchy is required but multiple roots are also
permitted.
Re: CSS White Space - margin and padding question
am 19.11.2007 15:40:20 von Ben C
On 2007-11-19, Andy Dingley wrote:
> On 17 Nov, 09:43, Ben C wrote:
>
>> Even if headings are supposed to be strictly hierarchical, you could
>> still have two top level headings in a document
>
> I've not checked this in the standard, but I don't believe so.
>
> Under W3C HTML (the only real sort) there's no restriction on
> hierarchy or ordering of at all. Do whatever you like.
>
> Under the bizarre aberrant ISO HTML (which I intend to ignore rather
> than dissecting), the require both strict hierarchies _and_ a single
> as a root.
Are you sure? From https://www.cs.tcd.ie/15445/15445.html#DTD:
Doesn't that mean the BODY must contain one _or more_ of a block or a
H#?
So
would be valid.
Re: CSS White Space - margin and padding question
am 19.11.2007 15:49:48 von lws4art
Ben C wrote:
> On 2007-11-19, Andy Dingley wrote:
>> On 17 Nov, 09:43, Ben C wrote:
>>
>>> Even if headings are supposed to be strictly hierarchical, you could
>>> still have two top level headings in a document
>> I've not checked this in the standard, but I don't believe so.
>>
>> Under W3C HTML (the only real sort) there's no restriction on
>> hierarchy or ordering of at all. Do whatever you like.
>>
>> Under the bizarre aberrant ISO HTML (which I intend to ignore rather
>> than dissecting), the require both strict hierarchies _and_ a single
>> as a root.
>
> Are you sure? From https://www.cs.tcd.ie/15445/15445.html#DTD:
>
>
>
> Doesn't that mean the BODY must contain one _or more_ of a block or a
> H#?
>
> So
>
>
>
>
>
>
> would be valid.
Just because the it will parse does not necessary mean that it makes
sense. You could put your address in an ACRONYM element, or your site
navigation links in definition list DT. It can validate as valid HTML
but it wouldn't make semantic sense.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Re: CSS White Space - margin and padding question
am 19.11.2007 17:23:42 von Andy Dingley
On 19 Nov, 14:40, Ben C wrote:
> Are you sure?
No, as I said. I haven't checked this, I have no intention of spending
the time to do so. The whole standard is a pointless abomination.
> From https://www.cs.tcd.ie/15445/15445.html#DTD:
I don't believe that it's the DTD that expresses these constraints,
but rather the supporting text. However I don't know section numbers
or web links to it.