[SOLVED] 2 validation errors

This is a discussion on "[SOLVED] 2 validation errors" within the Web Page Design section. This forum, and the thread "[SOLVED] 2 validation errors are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 15th, 2008, 14:08
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] 2 validation errors

hey, could somebody please tell me how to fix the 2 validation errors im getting......

http://www.design365.co.uk/farmaround/home.htm

Ive managed to get the errors down from 96 to 2 lol.

Thanks
Reply With Quote

  #2 (permalink)  
Old Jan 15th, 2008, 14:20
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 validation errors

You need to move the presentational attributes "border" and "align" out of your XHTML, and into your CSS.

For example, this CSS removes borders on all images that are inside a <a> element:

Code: Select all
a img {
border: 0;
}
...and this CSS centres the footer text:
Code: Select all
div#footer {
text-align: center;
}
Reply With Quote
  #3 (permalink)  
Old Jan 15th, 2008, 14:31
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 validation errors

thanks mike that worked a treat. Im a bit gutted i cant use div align=center though lol!
Reply With Quote
  #4 (permalink)  
Old Jan 15th, 2008, 14:36
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 validation errors

Quote:
Originally Posted by danny322 View Post
thanks mike that worked a treat. Im a bit gutted i cant use div align=center though lol!
My pleasure.

<div align="center"> is no loss: CSS can do this. For centred boxes, use auto margins:

Code: Select all
div.centredBox {
width: 300px;
margin: 0 auto;
}
Reply With Quote
  #5 (permalink)  
Old Jan 15th, 2008, 15:01
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] 2 validation errors

hmmm. Yea i use margin: 0 auto; all the time. However, when i removed the div align=center i put a margin: 0 auto; on the div#footer_container but it didnt center it. Im guessing for margin: 0 auto; to work you need to set a width?
Reply With Quote
  #6 (permalink)  
Old Jan 15th, 2008, 15:26
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] 2 validation errors

Quote:
Originally Posted by danny322 View Post
hmmm. Yea i use margin: 0 auto; all the time. However, when i removed the div align=center i put a margin: 0 auto; on the div#footer_container but it didnt center it. Im guessing for margin: 0 auto; to work you need to set a width?
Yes, you need to set a width. If you don't set a width, there's no way to tell how wide it's supposed to be, and therefore it's impossible to calculate the space available for auto margins.

Congratulations for validating your site against a Strict doctype.
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Please help validate 4 css errors! Oak Web Page Design 3 Jan 10th, 2008 11:20
validation errors danny322 Web Page Design 10 Nov 13th, 2007 12:51
Can someone make sense of these validation errors? alexgeek Web Page Design 7 Oct 10th, 2007 13:38
Some confusing validation errors on my home page Zonglars Web Page Design 2 Jul 16th, 2007 14:51
Validation errors I can't resolve Craigj1303 Web Page Design 4 May 29th, 2007 22:23


All times are GMT. The time now is 16:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43