homepage Welcome to WebmasterWorld Guest from 54.242.200.172
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
W3C Validation for a Centered Google Ad
jcmos




msg:4381876
 11:50 pm on Oct 31, 2011 (gmt 0)

Hello there,

Is anyone having problems with the W3C validation?
It is being a bit annoying now.
Can anyone explain to me how to center a Google Add in a module, part of a CMS, with script tags without getting penalized by the W3C scheme?

Note that you can not use <center>, <div> and <p>

cheers
JC

 

penders




msg:4381992
 10:31 am on Nov 1, 2011 (gmt 0)

The <center> tag is deprecated (since it is presentational) and <p> can only contain certain other elements since it is primarily intended for a paragraph of text. The <div> element is probably the one to go for, but it will depend on the context where it is to be used. You might even be able to center the Goodle-Ad using existing elements?

You could perhaps post the resulting markup to see what we have to work with, but I suspect this is more of a CSS issue than an HTML one?

rocknbil




msg:4382203
 6:25 pm on Nov 1, 2011 (gmt 0)

Wrap it in a div, as mentioned, with margin:auto? text-align:center is likely to give you grief as that is, of course, for text and inline elements 9it will center things inside it you may not want centered.)

zabalex




msg:4383260
 10:07 pm on Nov 3, 2011 (gmt 0)

Put the entire ad script within a div and make the div align center. if you want to add the script through a cms just click on the source code and then add a div into it.

JackR




msg:4383262
 10:12 pm on Nov 3, 2011 (gmt 0)

I recently had issues getting a Google Maps iframe to validate and came up with the followig solution for XHTML 1.0 Strict validation:

<object style="width: 855px; height: 500px; border: 4px" data="http://example.co.uk/"></object>

rocknbil




msg:4383552
 4:05 pm on Nov 4, 2011 (gmt 0)

div align center


The align attribute is deprecated in HTML 4,5, and XHTML, along with <font>, <center>, and others. Margin:auto is usually a good substitute. It will still "work," it just won't validate.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved