Netscape H1 problem

admin

Administrator
Staff member
Hi All<br />
<br />
I'm trying to contain a Heading 1 title within a table that is 10px high. If I style the H1 tag with zero margins then the whitespace dissapears in IE/NN6.xx and the table stays at 10px high. However, when I view the page in NN4.xx there is whitespace at the top and bottom of the heading, and the table expands to accommodate this. How do I fix this in NN4.xx as well?<br />
<br />
Cheers,<br />
Kenny.<!--content-->NN4.x doesn't support margin correctly. Are you useing it inline? You should never use 'margin' in NN4.x as an inline style due to severe page-mangling bugs.<!--content-->that is not the case at all. NS4.xx accepts the margins, in fact it is recommended to use margin: 0px<br />
<br />
but NS4.xx's font size is different in size compared to other browsers. do you have an example?<!--content-->Hi Folks<br />
<br />
Here's an example of what I'm talking about (file attached). The table stays the correct height in IE/NN6.xx but NN4.xx doesn't seem to pay attention to the margin setting.<br />
<br />
Help!<br />
<br />
Cheers,<br />
Kenny.<!--content-->try <br />
<br />
margin: 0px 0px 0px 0px;<br />
<br />
or<br />
<br />
margin: 0 0 0 0;<br />
<br />
or margin-height: 0px<!--content-->NN4.xx is terrible with Stlye Sheets... this is the official line from the ????? in a nutshell series by O'reilly (very reliable software lit):<br />
<br />
margin should never be used on inline elements in NN4.x, which has severe and page-mangling bugs. <br />
<br />
NN4.x also does not suppot at least 50% of CSS 1.0 recomendations. Excuse my spelling.<br />
<br />
We shall have to differ on this one Scoutt.<!--content-->whoa cowboy. I never said NN4.xx supports all of css. I know it supports less then half of css1, but the support for margins is buggy at best in NN4. but inline and a style sheet are no different. they act the same according to the browser. in fact all inline styles overrule the style sheet.<!--content-->Just kicking up a fuss. Don't mean to be harsh Scoutt or over-bearing. I am in the process of learning CCS correctly and picking up things as correctly as possible.<br />
<br />
I am aware of the cascade order... however, and I am not sure of this, could the various levels of stlye sheet be parsed differently in NN4.X??? thus causing the problem for inline margins.<br />
<br />
Just kicking up a fuss ;)<!--content-->oh I know. :)<br />
<br />
see when you use inline styles, it always over rules the external style sheet. even in IE and other browsers. tha tis all I meant.<!--content-->do me a favor entimp,<br />
<br />
take that file up above and change the margins to 50 or use this<br />
<br />
margin: 50 50 50 50;<br />
<br />
and tell me what it does in NS4.xx<br />
<br />
I bet it will work. so then change them back to 0 and that is all you get. the problem is, I bet, that the H1 tag is a block level element and will always have that space around it. just like a form tag. in IE you can get rid of both of those spaces but not in NS4.xx<!--content-->I am at work, overnights, will look at this when i get home in morning and get straight back to you.<!--content-->I meant to say<br />
<br />
"I" Don't mean to be harsh or overbearing. Will have a look at the code in the morning.<!--content-->Regarding block level elements: Inline elements effectivly don't take top and bottom margins (they are allowed but have no effect on page layout). With inline elements, only left and right margins of inline elements have an effect, and they don't collapse with adjacent margins.<br />
<br />
So CSS mark-up will work differently if cacased differently, at least it would seem so at a block level elements of html.<br />
<br />
Kenny I would suggest that you try what you need with the <span></span> tag. This isn't a block level element so you should have no problems with the margins for top and bottom. It does make sense why screwing with the top and bottom margins in block elements becomes difficult in terms of the browser having to lay the page out. You can use the <span> tag numerous time to different effect in conjunction with a CLASS or ID component.<br />
<br />
Alternativly you could try adapting the H1 tag with an external stlye sheet, personally I think this is a waste of time as it will prob have the same effect.<br />
<br />
Hey this is fun ;)<!--content-->Originally posted by entimp <br />
Regarding block level elements: Inline elements effectivly don't take top and bottom margins (they are allowed but have no effect on page layout). With inline elements, only left and right margins of inline elements have an effect, and they don't collapse with adjacent margins.<br />
where did you hear that crap :P. look at this little simple table I made just to show how the from tag makes a margin on top or on bottom and NS can't get rid of it. go ahead and look at the source and see that it is a simple table with a form in it. <!-- m --><a class="postlink" href="http://www.snippetlibrary.com/test/tabletest.htm">http://www.snippetlibrary.com/test/tabletest.htm</a><!-- m --><br />
<br />
the only reason I used a table is so you can see the space it leaves. now it doens't matter what you do you can't get rid of that margin in NS, IE is real easy. so the <form> tag is a block level element and leaves margins.<br />
<br />
I think you better buy another book as that one is outdated, ;)<br />
<br />
But I do agree he shuold use the span tag.<!--content-->And I am gonna stick to my guns on this one. My source for the quote is from a O'Reilly title. VIsit them at<br />
<br />
<!-- m --><a class="postlink" href="http://www.oreilly.com">http://www.oreilly.com</a><!-- m --><br />
<br />
I don't know if you have seen any of these titles, but there aren't many better as I am sure many will testify. I am in a bum situation at the moment as I installed a 40 gig hard drive yesterday. I almost lost the primary master drive today. So till I know things are stable on my system I am not going to be doing much on it. In fact I am going to post a question or two in the hardware forum if you want a look.<br />
<br />
As soon as I get it to purr I will test various inline set-ups and then compare them with imported style sheets and different browsers.<br />
<br />
We shall see.<!--content-->this is not funny as the block level element clearly has margins around it, I already proved it. it doesn't take special software to run it or test it.<br />
<br />
I will even find out where it says it at W3C as they set teh standards for css. but if you want to prove me wrong then be my guess, I will sit back and just watch, ;)<!--content-->This simple question has hit two pages of thread! I am pissing myself! It keeps me happy at work overnight anyway.<br />
<br />
But you have a challenge sir, and I am on my way to W3 now ;)<!--content-->Check these three out.<br />
<br />
<!-- m --><a class="postlink" href="http://www.webreview.com/browsers/browser_implementation.shtml#difference_14">http://www.webreview.com/browsers/brows ... ference_14</a><!-- m --><br />
<br />
<!-- m --><a class="postlink" href="http://www.webreview.com/style/css1/charts/notes.shtml#5505">http://www.webreview.com/style/css1/cha ... shtml#5505</a><!-- m --><br />
<br />
<!-- m --><a class="postlink" href="http://www.webreview.com/style/css1/charts/mastergrid.shtml">http://www.webreview.com/style/css1/cha ... grid.shtml</a><!-- m --><br />
<br />
The ball is in your cascading stlye sheet now! ;)<!--content-->walla...... :D here is one<br />
<br />
<!-- m --><a class="postlink" href="http://www.faqts.com/knowledge_base/view.phtml/aid/10786/fid/680">http://www.faqts.com/knowledge_base/vie ... 86/fid/680</a><!-- m --><br />
<br />
and I will search w3c later as I have run out of time.<br />
<br />
and he shoots and scores ;)<!--content-->This far from ideal when authoring a page. What a mess that would be to do that on a reg basis. Besides setting negative values in CSS has it's own problems. <br />
<br />
Anyway the link you provided answers the question...<br />
<br />
While you can not (to my knowledge) eliminate the line space, since form is considered a block level element <br />
<br />
Anyway, lets get back to the point... NN4.X and include block level elements:<br />
<br />
I think the conclusion is that you can't change the margins, if you can you cheated and it probably won't work on all browsers. ;)<br />
<br />
All the same look at the links I posted, they suggest enough in my favour.<br />
<br />
<br />
<br />
The crowds are on the pitch! They think it is all over! It is now! (Germany V's England 1966).<!--content-->yes you are absolutly right. you can increase the margins but you can't make them disappear in NS4.xx like in IE and others. that is the whole point of this thread. you can expand them but you can't make them zero in Netscape 4.xx<br />
<br />
good conversation entimp, and hope we didn't run off kennyritch, sorry bud, but you opened a can of worms on this one. ;)<!--content-->Hi Guys<br />
<br />
Thanks for a VERY entertaining discussion! I'll give the <SPAN> tags a go tonight and see how I get on.<br />
<br />
Oh, and isn't it amazing the way English fans can always manage to get the 1966 World Cup mentioned in even the most obscure conversation? Hmmm ... where did they rank this year?!!!<br />
<br />
Cheers,<br />
Kenny.<!--content-->I still have a prob or two with a new hard drive I have purchased. Once I'm happy with it and the my system stops crashing I am gonna test the CSS probs on 4.x and see how they go.<br />
<br />
We ranked joint 8th and finished on a poor 45 mins. But I'm happy with the way the boys played. A youngish team and the discipline is back... Portugal will be next and lets see then. At least we stuffed Argentina. Yey.<br />
<br />
Scoutt... it has been an interesting thread. The only way I'll be happy, and I will concede defeat if I must, is when I bake this problem myself and test the proverbial problem.<br />
<br />
A post soon from me I hope.<!--content-->
 
Back
Top