google-maps iframe error on validation..
hello, my english may not be that good so excuse me if u find mistakes..
so my problem is that i have inserted a map on my site from googlemaps with <iframe> tags and when i do the validation i get the following 4 errors..
Line 105, Column 243: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
Line 105, Column 243: The scrolling attribute on the iframe element is obsolete. Use CSS instead.
Line 105, Column 243: The marginheight attribute on the iframe element is obsolete. Use CSS instead.
Line 105, Column 243: The marginwidth attribute on the iframe element is obsolete. Use CSS instead.
what can i do to erase these errors?
any help will be appreciated.. thank you in advance.
Contact Google.. wait FOREVER for response/correction...
Petition the W3C to approve/adapt the Google errors in their specs...wait FOREVER for response/correction...
or... just don't worry about the errors. If the page works in most browsers.. leave well enough alone.
Eye for Video
i just want my website to become a top at google search, and errors wont help me in this.. :/
A few errors will mean little compared to the page content and the number and quality of inbound links.
But if you want, just edit the <iframe> code by hand. You can remove those attributes and style as needed. Those attributes are just styling issues anyway.
This is just an issue with HTML5, not lower versions.
Eye for Video
There is an alternative, which would solve this, do not use an Iframe. If you look carefully at the code Google supply for the map, it actually breaks into two links:
1. The active link that is automatically displayed in the Iframe.
2. A link to display a larger map, which is not displayed in the Iframe.
What I do is:
a) Initially use the code as given, and capture the map display using Print Screen. This can be pasted in your favourite graphic editor, optimised, and written to a JPG.
b) I then substitute an <IMG> displaying the jpg file for the Iframe.
c) I leave the second call to Google Maps, so people can still access a scrollable, zoomable, active image if required.
This has the additional benefit that the load time for my page is not dependent on a response from Google Maps, which can sometimes be slow. If you want to see what I mean, this site has two Google maps on the home page, which is something I would not recommend you do with live links to Google Maps, particularly on a home page!!! Incidentally it is also an example of how, using fluid design techniques, you can design and structure a site to be viewable on screens from 320 pixels wide upwards. But that is another story...
Last edited by jedaisoul; 06-23-2012 at 12:24 PM.
thank you for the solutions u gave me
remove some text
html5 is not supporting frameborder="0" scrolling="no" marginheight="0" marginwidth="0" so just remove that from code and i think it will work.
Perfect e Solutions
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)