35 replies [Last post]
rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

I've got an H1 with a background image and hiding the h1 text... trying to float another piece of text in the h1... IE will let me do it, but FF won't.... I always assume FF is correct vs IE but wondering what property in css IE has wrong in this case.

Here's the very minimal code for test purposes:
CSS

html {height:100%}
body {min-height:101%; font:100.01%/130% Verdana, Helvetica, sans-serif; 
 color:#333; background:#dcdcdc; width:750px; margin:0 auto;}

/* Set all elements to 0 padding margin and border */
* {padding:0;margin:0;border:0;}

/* Header */
h1 {float:left; position:relative; top:0; left:0; overflow:hidden; font-size:1.4em;}
h1, h1 span {width:750px; height:110px;}
h1 a span {display: block;
 position:absolute; left:0; top:0; z-index:1;
 background: url(image.jpg) no-repeat 0 0;}
h1 a:hover span {cursor:pointer;}

h1 a.contact {float:right; margin-right:10px; font-size:.6em; text-decoration:none;} 

HTML

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>My Little Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>
<body id="about">


<h1><a href="/" title="">my company<span><a class="contact" href="">contact us</a></span></a>
</h1>
</body>
</html>

IE shows the contact us link but FF doesn't
tia for any insight you can provide

drhowarddrfine
Offline
Leader
Last seen: 11 years 46 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

IE allows this...FF doesn't - can you tell me why?

It works for me. I also see the 'contact us'.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

u see it in FF?

drhowarddrfine
Offline
Leader
Last seen: 11 years 46 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

IE allows this...FF doesn't - can you tell me why?

Yep.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

What version of FF?
I don't see it in 1.0.7 or 1.5.0.1
The 1.5.0.1 machine just viewed for the first time so there can't be a chance of a cache problem.

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

here's link to a live page... why is there no contact us link in the upper right corner in FF?

http://www.redhorseoil.com/test/aloannow/ffvsie.html

drhowarddrfine
Offline
Leader
Last seen: 11 years 46 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

IE allows this...FF doesn't - can you tell me why?

I've never done it this way before so I'm not quite following it but the 'my company' is hiding behind the image. Remove the position:absolute and you'll see it there.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 23 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

IE allows this...FF doesn't - can you tell me why?

if you also remove overflow:hidden; contact will appear too.

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

drhoward... my company text is supposed to be hiding
DanA... removing overflo hidden doesn't show "contact" for me???

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 23 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

IE allows this...FF doesn't - can you tell me why?

Your html code is not valid.
with valid code :
<h1><a href="/" title="">my company</a><a class="contact" href="/"><span>contact us</span></a></div></h1>
contact appears (not where you would like to as span is an inline element, but as the code has to be changed...)

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

drhowarddrfine
Offline
Leader
Last seen: 11 years 46 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

IE allows this...FF doesn't - can you tell me why?

I meant 'contact us' not 'my company'.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

drhoward... still no good...
Both your code and my code are valid... neither one achieves the desired result.

While your code does display "contact us" in both browsers - if you put a page html to both links... say home.html and contact.html; both the logo and the contact us link point to the same page

My code does not display "contact us" in FF... but if you hover of the top right of the logo you can see that it thinks there is a link there... albeit to home.html rather than contact.html
IExplorer OTOH does exactly what I want it to... now assuming IE is incorrect... why is it incorrect and how can I get FF to mimic this incorrect behavior?

thanks

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 23 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

IE allows this...FF doesn't - can you tell me why?

Valid with the SGML parser, not with Tidy :

HTML Validation Result
----------------------
http://www.redhorseoil.com/test/aloannow/ffvsie.html

line 30 column 44 - Warning: missing </span> before <a>
line 30 column 5 - Warning: missing </a> before <a>
line 30 column 103 - Warning: discarding unexpected </span>
line 30 column 110 - Warning: discarding unexpected </a>
line 30 column 44 - Warning: trimming empty <span>
0 errors / 5 warnings

Which one is right?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Anchor nesting is not legal as far as I have always been aware although in fairness the xhtml 1.0 dtd does say "should not be nested"

XHTML 1.0 DTD.

<!-- content is %Inline; except that anchors shouldn't be nested -->

<!ELEMENT a %a.content;>
<!ATTLIST a
  %attrs;
  %focus;
  charset     %Charset;      #IMPLIED
  type        %ContentType;  #IMPLIED
  name        NMTOKEN        #IMPLIED
  href        %URI;          #IMPLIED
  hreflang    %LanguageCode; #IMPLIED
  rel         %LinkTypes;    #IMPLIED
  rev         %LinkTypes;    #IMPLIED
  shape       %Shape;        "rect"
  coords      %Coords;       #IMPLIED

HTML 4.0 DTD.

<!ELEMENT A - - (%inline;)* -(A)  <<< says can not be nested!
>

The nesting of that snippet just looks completely wrong rmfred I would find a way of reworking it.

Not sure why the validator allows it but in this instance I would ignore it, html-Tidy throws up errors fwiw.

Hugo[/b]

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

Good question.... I've always relied on the validator... any gurus out there?

DanA
DanA's picture
Offline
Elder
Last seen: 11 years 23 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

IE allows this...FF doesn't - can you tell me why?

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

Hugo wrote:
Anchor nesting is not legal as far as I have always been aware although in fairness the xhtml 1.0 dtd does say "should not be nested"

XHTML 1.0 DTD.

<!-- content is %Inline; except that anchors shouldn't be nested -->

<!ELEMENT a %a.content;>
<!ATTLIST a
  %attrs;
  %focus;
  charset     %Charset;      #IMPLIED
  type        %ContentType;  #IMPLIED
  name        NMTOKEN        #IMPLIED
  href        %URI;          #IMPLIED
  hreflang    %LanguageCode; #IMPLIED
  rel         %LinkTypes;    #IMPLIED
  rev         %LinkTypes;    #IMPLIED
  shape       %Shape;        "rect"
  coords      %Coords;       #IMPLIED
>

The nesting of that snippet just looks completely wrong rmfred I would find a way of reworking it.

OK... I've been trying Smile hence my post LOL... and it does look wrong to me as well; but I'm unable to come up with something that works (except in IE)
I normally have a tendency to over think things, and overuse divs... so I was trying for a minimalist approach...

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

rmfred I'll admit I haven't really looked in detail at what you're trying to achieve here but off the top of my head if your trying to get that 'contact' link on top of the logo background can you not just separate the anchors and use position absolute and z-indexing to get them in the stacking order you require.

Apologies if that is gibberish and misses the point, I'll try and have a deeper look a bit later if you haven't found a solution, either way though the order of spans and anchors at present isn't correct.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Rmfred just had a play and even given the slightly dubios nesting changing from float to absolute does bring the link to the fore

h1 a.contact { 
  position:absolute; 
  z-index:1;  
  margin-right:10px;  
  font-size:.6em;  
  text-decoration:none; 
} 


Don't know if this would suit obviously needs to be positioned and the nesting sorted out Smile and IE will doubtless have problems with z-indexing :roll:

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 32 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

IE allows this...FF doesn't - can you tell me why?

I think all you need to do is give the span a little positional reference + a touch of z-index equality.

html {
    height:100.1%
    }

body {
    position: relative; /*you need to do this if you're using the body
                         as your container, else h1 is referenced to 
                         html*/
    font:100.01%/130% Verdana, Helvetica, sans-serif;
    color:#333; 
    background:#ddd; 
    width:750px; 
    margin:0 auto;
    }

/* Set all elements to 0 padding margin and border */
* {
    padding:0;
    margin:0;
    border:0;
    }

/* Header */
h1 {
    float:left;
    font-size:1.4em;
    }

h1, h1 span {
    width: 750px; 
    height:110px;
    }

h1 a span {
    display: block;
    position:absolute; 
    left:0; 
    top:0; 
    z-index:1;
    background: url(topbar2.jpg) no-repeat;
    }

h1 a:hover span {
    cursor:pointer;
    }

h1 a.contact {
    position: relative;
    top: -1.5em;  /*since we're using RP, might as well offset it,
                    though some positive value of vertical align might
                    also work.*/ 
    float: right; 
    z-index: 1; 
    margin-right:10px; 
    font-size:.6em; 
    text-decoration:none;
    }

But why not simply put the link in an AP <p>, {top: 0; right: 0;}?

Nice find, Hugo, on the subtle diff between html and xhtml on the nested <a>s. News to me. "Should" is a pretty strong admonition. And, I wonder whether burying one in a span would be quite kosher in html? Nope, just checked—fails html4.01 strict due to nested <a>s.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Interesting, didn't get round to testing the two but wondered whether 'should' was just a loose use of language, so it's not then? seems a bit bizarre to my mind that an anchor could be nested, in fact it can't be , it would be nonsensical, I'm not about to start nesting them Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 32 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

IE allows this...FF doesn't - can you tell me why?

Ahh, Hugo. There is no loose usage in a specification. An abbreviated definition list is here, and the authoritative document is RFC 2119.

RFC 2119 wrote:
3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.

4. SHOULD NOT   This phrase, or the phrase "NOT RECOMMENDED" mean that
   there may exist valid reasons in particular circumstances when the
   particular behavior is acceptable or even useful, but the full
   implications should be understood and the case carefully weighed
   before implementing any behavior described with this label.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Well that's good to know that 'shouldn't' is used with specific intent, however it would be nice to establish what those conditions are that say "that there may exist valid reasons in particular circumstances " I wonder what those circumstances are that would accept an anchor nesting within another, is there a valid reason for this arrangement to exist? or is it as I suspect actually in truth a lax detail on the part of the specs.

I'm most probably wrong, and there is most likely a definite reason to go from being exacting in html to "you should not really do this but if you really want to we'll let you".

The RFC is pedantic about the use of these words and there meaning and intention, the use of the words in this context seems not to be !?, somewhat of a contradiction to my mind.

Research is called for in the morning, when I am rested.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

To partly answer my own question:

w3c definitions wrote:
Should
With respect to implementations, the word "should" is to be interpreted as an implementation recommendation, but not a requirement. With respect to documents, the word "should" is to be interpreted as recommended programming practice for documents and a requirement for Strictly Conforming XHTML Documents.

In documents it is to be concidered recomended practise; in strictly conforming xhtml documents a requirement. I take that to include 'should not' as it is not directly mentioned, therefore would one not asume that the validator would not validate an xhtml structure containing nested anchors, but flag them as errors or warnings?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 32 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

IE allows this...FF doesn't - can you tell me why?

When the nitty gets that gritty, I get lost. It is enough for me that there should[1] be compelling reason before going against the grain.

cheers,

gary

[1] And that depends on what the definition of should should be[1a].
[1a] What would we have done had Clinton never stained that blue dress?

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

presidential peccadillos aside;

On further reading, SGML allows for the authoring of DTDs that can state 'Exclusions' and this is what we see in the html4.0 DTD
-(a) as a direct reference to the fact that an anchor Must Not be nested within another.

XML however does not allow for the use of 'Exclusions' In the DTD
This does not mean that anchors can be nested , as they can't despite the manner in which it has to be described in the DTD.

I guess therefore that the W3C validator has to ignore the illegal nesting according to the DTD instructions.

In answer to Rmfreds earlier question as to whether to believe the HTML-Tidy version of events or the W3C validator; it comes down to the fact that the W3C validator is both correct and incorrect at the same time, it's observing the XHTML DTD to the letter yet overlooking the fact that it is a W3C prohibition to nest anchors within anchors.

It therefore follows that the W3C validator really has to be used in conjunction with some understanding of the W3C specs and that it is not to taken as a verbatim in it's checks.

This suggests that we must be careful in pronouncing the W3C validator checks as definitive, as they are not, and to someone new to structure and syntax the results could in actual fact lead to mal formed structure not well formedness!

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 32 weeks 6 days ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

IE allows this...FF doesn't - can you tell me why?

Yeah? Well, what he said!

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Hmm, thanks Gary :? Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

OK... I must admit some of the content in the previous post's is a bit over my head Smile interesting reading and discussion none the less.
Both Hugo and Gary presented solution(Drunk that will work... thanks both of you.

I should've considered AP before... but use it so infrequently it didn't even cross my mind (my apologies)... but I was hung up on wondering why IE allowed what I was trying to do and FF didn't that I completely lost sight of trying a different tactic.

I think the simplest, and maybe the most semantic is to put the link into an AP p tag?

I've uploaded this change to the test page mentioned previously in the thread.

Again, thanks for the help and interesting discussion. If anyone can clue me in on why IE did what I wanted and FF didn't... I would welcome the explanation...

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

I've lost track slightly rmfred but I would have thought FF just didn't know what to do with the nested anchor and viewed it as illegal so just chopped it away or at least thought how do I render two pieces of text together as it were and gave context to the top level item , IE is perhaps kinder and forgiving in trying to interpret what you intended and thought two bits of stuff must want it displayed somewhere I'll accommodate. Sorry rather a simplistic take on the subject Smile

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

Hugo... In absence of a "better" explanation I'll take yours LOL... kinda what I was thinking anyway...
Do you think my using an AP p with the link enclosed in the p tag is the way to go?
TIA

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

I think you can probably get away with it although not strictly a paragraph. Does it have to be in anything?

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

Hugo wrote:
I think you can probably get away with it although not strictly a paragraph. Does it have to be in anything?

Hugo.

Hugo;
If I remove it from a p tag... it still works, but is no longer valid html
document type does not allow element "a" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

So I guess I keep it wrapped in a p tag Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

IE allows this...FF doesn't - can you tell me why?

Oh , ok good point, inline elements not allowed as direct children of body.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rmfred
rmfred's picture
Offline
Elder
Rock Springs, WY
Last seen: 3 years 1 week ago
Rock Springs, WY
Timezone: GMT-6
Joined: 2004-01-31
Posts: 1073
Points: 31

IE allows this...FF doesn't - can you tell me why?

Hugo wrote:
Oh , ok good point, inline elements not allowed as direct children of body.

Yeah... just figured that out...
So... I'm attempting, as I think I mentioned previously, to cut down on my proclivity for using divs... as in wrapping everything in a div so to speak... and just trying to style actual tags w/o using a div unless absolutely necessary...
ie..
using body to center the page instead of using a wrapper
just using h1 tag for the header instead of using a header div
and so on...

Since inline elements are not allowed as direct children of body, as long as I enclose them in a proper block element tag I should be alright, even if it is not totally sematic html?

I'm really trying to curb my "divitus" but it sure seems like it is sometimes easier to overpopulate with divs?

Thanks for everyones help and comments on this thread