SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-20-2006, 06:46 PM
sparrowhawk's Avatar
sparrowhawk sparrowhawk is offline
SEO Junior and a half
 
Join Date: Feb 2006
Location: NH (US)
Posts: 44 sparrowhawk is on a distinguished road
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)
Reply With Quote
  #2  
Old 02-20-2006, 07:46 PM
RyanSmith RyanSmith is offline
SEO
 
Join Date: Sep 2005
Location: Fort Collins, Colorado
Posts: 446 RyanSmith will become famous soon enoughRyanSmith will become famous soon enough
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.
__________________
AJAX Example Sites is now here! With a nice
AJAX Chat Application Tutorial
Reply With Quote
  #3  
Old 02-20-2006, 07:57 PM
sparrowhawk's Avatar
sparrowhawk sparrowhawk is offline
SEO Junior and a half
 
Join Date: Feb 2006
Location: NH (US)
Posts: 44 sparrowhawk is on a distinguished road
Quote:
Originally Posted by RyanSmith
Check out:
[url] 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.


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;
}
???
Reply With Quote
  #4  
Old 02-20-2006, 08:01 PM
sparrowhawk's Avatar
sparrowhawk sparrowhawk is offline
SEO Junior and a half
 
Join Date: Feb 2006
Location: NH (US)
Posts: 44 sparrowhawk is on a distinguished road
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.
Reply With Quote
  #5  
Old 02-22-2006, 05:30 AM
jlknauff's Avatar
jlknauff jlknauff is offline
SEO GUY Moderator
 
Join Date: May 2004
Location: In perpetual style
Posts: 3,305 jlknauff is on a distinguished road
And it would have taken less time too
__________________
Business Forum

Marketing Tips
Reply With Quote
  #6  
Old 01-23-2007, 01:42 PM
catanich catanich is offline
SEO Junior
 
Join Date: Jan 2007
Posts: 9 catanich is on a distinguished road
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 07:20 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.