help needed to understand a previous thread

D

David Graham

Hi
I have been trying to understand a thread Re: Help needed with css layout
problems posted 21/03/006

http://homepage.ntlworld.ie/spartanicus/HCS/masthead.htm

I removed the empty div using FF developer toolbar (great thing that
toolbar) and to my surprise the logo on the left disappeared as did the blue
coloured background of the parent masthead div and the 1px white line of the
child div. I solved the problem of why the logo goes - it's white letters,
therefore not seen without the blue backgound, and the white line goes
because it's the background colour of the empty div I've just removed.

#masthead div{clear:both;height:1px;background:#fff;font:0\0}

The clear:both is obviously doing a lot of work here but why does it's
presence mean the blue background of the parent masthead div gets displayed
and not without it?

Is the greater specificity the reason why this white background does not get
over ruled by the blue background of the parent masthead div or it simply
due to the stacking order i.e. the child div is more infront than the parent
div?

Hope Mr Spartanicus is around or one of the guru's

thanks for any help
David
 
M

Michael Winter

On 09/04/2006 11:10, David Graham wrote:

[snip]
http://homepage.ntlworld.ie/spartanicus/HCS/masthead.htm
[snip]

#masthead div{clear:both;height:1px;background:#fff;font:0\0}
^^^
The backslash in that font declaration should be a forward slash, by the
way. I know: it's Spartanicus' code.
The clear:both is obviously doing a lot of work here but why does
it's presence mean the blue background of the parent masthead div
gets displayed and not without it?

Much of the content of that masthead is floated, and floats are taken
out of the flow. The result is that they don't take up any vertical
space, as far as the containing div element is concerned, so it
collapses. Specifying the both value for the clear property forces the
inner div element below the floats, stretching the container in the
process.
Is the greater specificity the reason why this white background does
not get over ruled by the blue background of the parent masthead div
or it simply due to the stacking order i.e. the child div is more
infront than the parent div?

The latter.
Hope Mr Spartanicus is around or one of the guru's

I believe you meant, "one of the _other_ guru's". I think Spartanicus
qualifies as one himself. ;-)

Mike
 
M

Michael Winter

[snip]
^^^
The backslash in that font declaration should be a forward slash,
by the way.

It should not,

OK, fair enough. I thought you were trying to set both font size and
line height to zero, but made a typo. But, looking at it again, it would
also be missing a font family (which is required, of course).
it's a hack to get IE to play ball IIRC.
^^^^
You mean you can't remember? :p

Mike
 
D

David Graham

Spartanicus said:

Thanks to Michael and Spartanicus - I'm sure you both qualify for guru
status. I'm not sure what Spartanicus is trying to hack with the font thing,
I've come across many different types of hacks but not this one - any
explanation please about what IE does not do without this hack?
thanks again
David
 
D

David Graham

Toby Inkster said:
Argh! How can you post a correction, but ignore the most obvious error?!
For the not so well informed - what is the obvious error?
bye
David
 
J

Jim Moe

David said:
For the not so well informed - what is the obvious error?
It should be "gurus" not "guru's".
It's an extension of the "it's" vs "its" controversy.
 
B

Blinky the Shark

David said:
Thanks to Michael and Spartanicus - I'm sure you both qualify for guru
status.

I'm all in favor of "guru" status. It avoids the use of the
repeated totally wrong "guru's" in that context, in which there is no
reason for an apostrophe since it's not possessive (the guru's sandals)
and plurals don't use them. :)
 
N

Neredbojias

To further the education of mankind, "David Graham" <david.graham18
@ntlworld.com> declaimed:
For the not so well informed - what is the obvious error?

Should have been "...or one of the guri."
 
D

dorayme

Jim Moe said:
It should be "gurus" not "guru's".
It's an extension of the "it's" vs "its" controversy.

There is no controversy and it is not an extension of it... er...
 
J

Jim Moe

dorayme said:
There is no controversy and it is not an extension of it... er...
Well, given how often it is gotten wrong... I suspect people are using
"'s" for plural and possessive because it is soooo much simpler than
remembering all those pesky rules.
 
J

Jim Moe

Neredbojias said:
No "guri"? Hmm, that's strange. "Gurus" almost seems like it should be
pronounced 'gur-us' instead of 'gur-ooz'. Of course on the other hand,
I've never heard of "meni", either. :)
And just for fun, there is no "viri," only viruses.
 
T

Toby Inkster

Jim said:
Well, given how often it is gotten wrong... I suspect people are using
"'s" for plural and possessive because it is soooo much simpler than
remembering all those pesky rules.

* -s for plural
* -' for posessives of nouns that already end in "s"
* -'s for posessives of other nouns

tonnes of rules, yes.
 
E

Els

Toby said:
* -s for plural
* -' for posessives of nouns that already end in "s"
* -'s for posessives of other nouns

tonnes of rules, yes.

I think some people include
* -'s for abbreviation of "is"
* -s for possessive of pronoun "it"

(which they shouldn't, but remembering the difference between verbs,
nouns and pronouns is too complicated for some ;-) )

BTW - anyone complaining about 'tons' of rules for English grammar
should really try and learn some Dutch. And after they master all the
rules, they should check the latest spelling changes and relearn the
rules again :\
 
D

dorayme

Toby Inkster said:
* -s for plural
* -' for posessives of nouns that already end in "s"
* -'s for posessives of other nouns

tonnes of rules, yes.

So, your modern metric eye stamps itself on common English
expressions... the way of the future I guess. When decimal
currency and weights and measures were introduced into some
countries, there were penalties in law for using the old measures
and expressions (after a certain grace period). I bet never
enforced! Still, it is wise to be safe, Toby, you never know who
might be reading this...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top