PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Old December 12th, 2012, 04:49 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
W3 Validation Errors

Really need some help from an expert.

My site estateagentslondon co.uk failed the html validation test at validator . w3 . org /

I placed the clean code into the site and tested and all errors were gone but you cant click the three boxes anymore, links somehow disabled.

Also, the h1 heading goes even smaller with the new code. I always though the heading should be large, so need help with that too.

The old code is in place right now.

Please if anyone can help, then thanks.

Reply With Quote
Old December 12th, 2012, 05:53 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Galway
Posts: 1,362 DavidMR User rank is Private First Class (20 - 50 Reputation Level)DavidMR User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 41 m 31 sec
Reputation Power: 8
You have divs and p's inside hyperlinks. They are block elements, you cant do that

If you want the hyperlinks to look different use style or class.
__________________
When I die, I want to go peacefully like my Grandfather did, in his sleep -- not screaming, like the passengers in his car.

Reply With Quote
Old December 12th, 2012, 05:56 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
Hi,

Thanks for the replies, but I do not know anything about code and do not know how to fix this issue.

I cant understand why I can't click the boxes anymore or why the h1 heading has gone smaller.

Reply With Quote
Old December 12th, 2012, 05:58 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
Line 47, Column 42: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<div class="red-box">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 55, Column 44: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<div class="green-box">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 63, Column 43: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<div class="blue-box">

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Reply With Quote
Old December 12th, 2012, 06:00 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Galway
Posts: 1,362 DavidMR User rank is Private First Class (20 - 50 Reputation Level)DavidMR User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 41 m 31 sec
Reputation Power: 8
is the current code at http://www.estateagentslondon.co.uk/ working?

Also the errors you posted are because of what i said before, remove divs and p's from between a's


WRONG
Code:
<a href="sdfsdfds">
<div>
sdfsdfs
</div>
</a>


RIGHT
Code:
<a style="font-size:16px;color:#ff00ff;" href="dfsdf">link</a>

Reply With Quote
Old December 12th, 2012, 06:03 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
The current code is the old code and has three errors.

Everything works though. It just doesn't pass the validation.

I installed the clean code and then removed it because I could no longer click the boxes!

edit, will try what you have suggested

Reply With Quote
Old December 12th, 2012, 06:04 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Galway
Posts: 1,362 DavidMR User rank is Private First Class (20 - 50 Reputation Level)DavidMR User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 41 m 31 sec
Reputation Power: 8
provide a link to the broken code, preferably somewhere where we can view the source online.

Reply With Quote
Old December 12th, 2012, 06:08 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
I cant post here as it wont let me post links.

Where can I post it?

If you go to www. validator . w3 . org
Type in my url.
Click check and then check again with 'Clean up Markup with HTML-Tidy' box ticked it will give you code that is clean BUT the boxes don't click like they do now!
Also, the h1 heading will go smaller!

Reply With Quote
Old December 12th, 2012, 06:18 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Galway
Posts: 1,362 DavidMR User rank is Private First Class (20 - 50 Reputation Level)DavidMR User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 41 m 31 sec
Reputation Power: 8
if you want the divs to be clickable, you need to set an onclick event on them.

<div onclick="alert('you clicked me');">sdfsdf</div>

the HI can be styled using

<h1 style="font-size:60px;"></h1>

Reply With Quote
Old December 12th, 2012, 06:19 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
this is the clean code but the boxes do not click to their destination!!




<div class="inner clearfix">
<div class="main-box"><a href="replacedbecauseIcannotpostlinks"></a>
<div class="red-box">
<h2>Estate Agent Reviews</h2>
<p>Reviews from landlord and tenants on estate agents around London</p>
</div>
</div>
<div class="main-box"><a href="replacedbecauseIcannotpostlinks"></a>
<div class="green-box">
<h2>Letting Agent Reviews</h2>
<p>Reviews from landlords and tenants on letting agents around London</p>
</div>
</div>
<div class="main-box main-box-last"><a href="replacedbecauseIcannotpostlinks"></a>
<div class="blue-box">
<h2>Property Certificates</h2>
<p>Reviews of Gas, Electrical, EPC and Inventory Report suppliers</p>
</div>
</div>
<div class="clr"></div>
</div>
</div>
<div class="clearfix" id="bottom_in">

Reply With Quote
Old December 12th, 2012, 06:20 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
thank you, will check now

Reply With Quote
Old December 12th, 2012, 06:33 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
sorry im unclear on how to make the divs clickable:

how do I add this:

<div onclick="alert('you clicked me');">sdfsdf</div>

to that:

<div class="main-box"><a href="www. my site .com"></a>
<div class="red-box">

the logo clicks to the right location so it's strange

thank you again

Reply With Quote
Old December 12th, 2012, 06:59 AM
DavidMR's Avatar
DavidMR DavidMR is offline
Contributing User
Click here for more information.
 
Join Date: Apr 2007
Location: Galway
Posts: 1,362 DavidMR User rank is Private First Class (20 - 50 Reputation Level)DavidMR User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 41 m 31 sec
Reputation Power: 8
you have no text in your <a> tag

This is not a php problem btw.

div class="main-box" onclick="location.href='www.meh.com';">

Reply With Quote
Old December 12th, 2012, 07:05 AM
sandhu404 sandhu404 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 sandhu404 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 49 sec
Reputation Power: 0
I replaced that, most likely in a wrong way, but it didn't work.

Thank you so much for trying but I will pay someone to fix it.

Have a nice day.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > W3 Validation Errors


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap