Help - Search - Members - Calendar
Full Version: no attribute "allow transparency"
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
freeflow
Ok , so im validating my new site right now and i keep getting the no attribute "allow transparency" here is exactly what it says:
QUOTE
Error Line 111 column 107: there is no attribute "ALLOWTRANSPARENCY".
....html" name="main" allowtransparency="true" scrolling="no" style="position:ab
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.


How do i fix it?
mipadi
A link to your website would be handy, but it might be caused by an inappropriate document type definition. Every HTML document should begin with a !DOCTYPE declaration that specifies the version of HTML being used. For example, my site is marked up in (fully compliant) XHTML 1.1; my doctype is this:
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

A quick list of various Doctypes can be found here

Many errors result in an incorrect doctype definition. For instance, as noted, my site is XHTML 1.1. At first, it would not validate because my link tags had target="_blank" attributes, and some anchor tags had <a name="whatever">, which XHTML does not support. I had to get rid of the target attribute, and change name to id, for example.

One of two things is occuring:
  1. You are declaring a Doctype that does not support the "allowtransparency" attribute. As the site suggests, try change from, say HTML 4.01 Strict to HTML 4.01 transitional.
  2. "allowtransparency" is (most likely) a non-standard attribute that cannot be used in standards-compliant code.
freeflow
http://vibrance.foreverbliss.org
Oh i see, my site url is ^ .

The doctype i currently have is this
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


I never changed it because i didn't want to mess anything up.
Would i use this one because its an iframe?
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
?
mipadi
No, because the frameset DTD is identical to the transitional DTD, but uses <frameset> in place of <body> (which you're not doing with <iframes>). Basically, it deals with full-fledged framesets, not inline frames.

I'd say the answer is probably that the "allowtransparency" attribute is a proprietary browser extension that is not an officially recognized part of HTML 4.01.

Here is what the DTD returns for using the <iframe> tag:
CODE
<!ELEMENT IFRAME - - (%flow;)*         -- inline subwindow -->
<!ATTLIST IFRAME
 %coreattrs;                          -- id, class, style, title --
 longdesc    %URI;          #IMPLIED  -- link to long description
                                         (complements title) --
 name        CDATA          #IMPLIED  -- name of frame for targetting --
 src         %URI;          #IMPLIED  -- source of frame content --
 frameborder (1|0)          1         -- request frame borders? --
 marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
 marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
 scrolling   (yes|no|auto)  auto      -- scrollbar or none --
 align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
 height      %Length;       #IMPLIED  -- frame height --
 width       %Length;       #IMPLIED  -- frame width --
 >

(Now, I'm guessing you don't read the DTD language, but no worries--I do, so that's what I'm here for. wink.gif )

Essentially, you'll note that the "allowtransparency" attribute is not in the attribute list, which means--ta da--it is not an officially-recognized part of HTML 4.01 transitional (and, by extension, it is definitely not a recognized part of HTML 4.01 strict, either) and therefore will make a page not comply to standards if it is used.
freeflow
Ok thanks biggrin.gif alot. =]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.