Forum Moderators: open

Message Too Old, No Replies

BODY tag attributes -- topmargin, leftmargin

How can I validate and still give Netscape 4 the appearance I want

         

pcguru333

2:06 pm on Mar 27, 2002 (gmt 0)

10+ Year Member



Does anyone know of valid attributes that replace topmargin and leftmargin?

Or do you have to use CSS?

Amazingly I have a web page that completely validates except for those two attributes and I don't know what to replace them with.

Thanks

tedster

2:18 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know of any way to make Netscape 4 eliminate that extra padding except with those two tags. So you have a choice - validate and let your Netscape 4 visitors see that little glitch, or sacrifice the validation.

It's your choice, and just one more trade-off to add to the pile that websites require.

pcguru333

2:20 pm on Mar 27, 2002 (gmt 0)

10+ Year Member



thanks tedster

BlobFisk

2:21 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a problem I encountered on a project I'm working on at the moment.

Unfortunately, to remove the padding in NS4 you have to use the leftmargin="0" topmargin="0" atributes in the <body> tag - which means your page won't validate....

As Tedster said, it's a trade off.

Marshall

2:47 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The only way to get it to validate in NN4 is place the whole page in a <div> tag and position it absolutely.

pageoneresults

3:44 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Marshall is absolutely correct! I went for years not being able to achieve 100% W3C validation due to those two margin attributes. When I switched to CSS and absolute positioning, it is no longer a concern and the pages look just fine in NN4.x.

pcguru333

3:51 pm on Mar 27, 2002 (gmt 0)

10+ Year Member



good idea on the div tag!

BlobFisk

4:45 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does using a DIV tag not bring us back to one of the original problems a table based design had, that CSS fixed? Namely that if you have a 100% table encasing your entire page, the browser must read through the entire page code before it begins to render anything?

One of the (many) advantages of using CSS-P was that every 'element' on the site could be enclosed within it's own DIV and would be rendered one by one as the browser parsed the code within the <DIV></DIV> tags. Thus the user saw something happening on his/her screen to keep them interested as each DIV was displayed...

Surely using one div (while getting around the validation problem) is just bring us one step back towards the many problems encountered with tables?

tedster

4:47 pm on Mar 27, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nice tip.

I still see a sliver of margin in NN4.7 but it comes mighty close. Makes the tradeoff easier to swallow.

pat_s

6:45 pm on Mar 27, 2002 (gmt 0)

10+ Year Member



I've always wondered why those tags couldn't just have been added to the standard, at least for a transitional doctype? I mean..what harm are they really doing?