![]() |
How to replace these attributes using CSS
I am trying to get my homepage to validate using the W3C validator. I have only 4 attributes that I can't seem to replace with external styles.
the attributes modify the body element: leftmargin topmargin marginheight marginwidth so like: <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> I found a solution using absolute positioning: body { position: absolute; top: 0; left 0; } The problem is that I want to keep my page design centered: http://www.ajmoss.com/ if you care to see what I mean. Thanks in advance. Here's the validation issue - this may explain better than I have: http://validator.w3.org/check?uri=h...200=1&verbose=1 (I hope it's ok to link to the W3C validation tool) |
Check out:
http://maxdesign.com.au/presentation/page_layouts/ They have lots of neat tricks for layouts in CSS http://www.petefreitag.com/item/475.cfm also has some neat CSS tricks. I think what you probably want to do is get rid of the table and replace it with a DIV that has margin: 0px auto 0px auto; Or something like that. |
Quote:
That would work, and I've thought about redesiging the whole site using <div> tags, and css positioning. I was just wondering if there is a way to modify the body element and accomplish the same effect while still keeping the tables. can I apply the above to the body element - like: body { margin: 0px auto 0px auto; } ??? |
I realized I was being a jerk asking when I could just try it out. That worked great and now my page totally validates. Thanks so much.
|
And it would have taken less time too ;)
|
How about the following
body { margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; } and replace the 10px to 0 px. This validates. Jim Catanich |
| All times are GMT -8. The time now is 01:32 PM. |
Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.