Avatar billede timealert Nybegynder
23. november 2004 - 15:56 Der er 3 kommentarer og
1 løsning

validring af baggrundsbillede i celle?

Jeg har en tabel hvor jeg har sat et baggrundsbillede ind i en celle:

<th width="480" height="100%" valign="top" background="Images/sdbg7.gif" colspan="2" noWrap>
<p>bla bla</p>
</th>

Men når jeg validere min kode får jeg følgende svar:

"there is no attribute "BACKGROUND"

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."

Jeg kan ikke bruge CSS da billede skal gentages afhængigt af hvor meget tekst der er.

Hvordan skal jeg skrive min kode så det bliver standard?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
Avatar billede schaefner Juniormester
23. november 2004 - 15:57 #1
Brug CSS

<th style="width: 480px; height: 100%; verticala-lign: top; background: url(Images/sdbg7.gif)" colspan="2" noWrap>
<p>bla bla</p>
</th>
Avatar billede schaefner Juniormester
23. november 2004 - 15:58 #2
<th style="width: 480px; height: 100%; vertical-align: top; background: url(Images/sdbg7.gif); white-space: nowrap" colspan="2">
<p>bla bla</p>
</th>
Avatar billede schaefner Juniormester
23. november 2004 - 16:00 #3
Og billedet gentages fint med CSS.
Avatar billede timealert Nybegynder
23. november 2004 - 16:19 #4
tak
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester