Im Bezug auf den Code den ich eingebaut habe, habe ich ein Validator Problem.
Bei dem folgenden Code (Beachte </h1> tag Positionierung) meckert der Validator und der Blog sieht vernünftig aus:
<div id="wrapper">
<h1 id="header" onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;">
<!--blog name & description -->
<div id="blogname">
<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a><br />
<?php bloginfo('description'); ?></h1>
</div>
</h1>
</div>
Bei dem folgenden Code (Beachte </h1> tag Positionierung) meckert der Validator nicht - jedoch sieht der Blog fürchterlich aus, da alles verzogen ist:
<div id="wrapper">
<h1 id="header" onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;"></h1>
<!--blog name & description -->
<div id="blogname">
<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a><br />
<?php bloginfo('description'); ?>
</div>
</div>
In der style.css ist die Optik für wrapper wie folgt fest gelegt:
#wrapper {
background-color: #FFFFFF;
border-left: 5px solid #FFFFFF;
border-right: 5px solid #FFFFFF;
margin: 0px auto 0px auto;
padding: 0px;
text-align: center;
width: 726px;
}
In der style.css ist die Optik für blogname wie folgt fest gelegt:
#blogname {
background-repeat: no-repeat;
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
height: 330px;
margin: 0px;
padding: 15px 0px 0px 15px;
text-align: left;
vertical-align: bottom;
}
Alles anzeigen
In der style.css ist die Optik für header wie folgt fest gelegt:
#header {
background-repeat: no-repeat;
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
height: 330px;
margin: 0px;
padding: 1px 0px 0px 15px;
text-align: left;
vertical-align: bottom;
}
Alles anzeigen
Hier ist jedenfalls noch die Fehlermeldung vom Validator:
Zitat
- Line 186, Column 15: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag <div id="name">
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>").
Ich glaube, ich seh den Wald vor lauter Bäumen nicht. Der Teufel liegt im Detail.
Hat jemand eine Idee?
Exakt das selbe Problem habe ich auch mit deinem Code, alchymyth:
[COLOR=#000000]<div id="header">
<h1><a href="[COLOR=#0000cc]<?php [/COLOR][COLOR=#006600]echo [/COLOR][COLOR=#0000cc]get_option[/COLOR][COLOR=#006600]([/COLOR][COLOR=#cc0000]'home'[/COLOR][COLOR=#006600]); [/COLOR][COLOR=#0000cc]?>[/COLOR]/">[COLOR=#0000cc]<?php bloginfo[/COLOR][COLOR=#006600]([/COLOR][COLOR=#cc0000]'name'[/COLOR][COLOR=#006600]); [/COLOR][COLOR=#0000cc]?>[/COLOR]</a></h1>
<div class="description">[COLOR=#0000cc]<?php bloginfo[/COLOR][COLOR=#006600]([/COLOR][COLOR=#cc0000]'description'[/COLOR][COLOR=#006600]); [/COLOR][COLOR=#0000cc]?>[/COLOR]</div>
</div>[/COLOR]