Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   problem with Layout MAX width and XHTML valididation (http://forum.bytesforall.com/showthread.php?t=433)

frankhamm Feb 18, 2009 03:44 AM

problem with Layout MAX width and XHTML valididation
 
Hi Flyn, I have a problem with my site http://www.frank-hamm.de. until yesterday i had set the width of the page to 99% fluid (standard setting) Now I have found that on rearly wide monitors (like 1440 an more) the content will be streched extremely so that it will become hard to read.

To solve this I have set Layout MAX width to 1200 Pix.

Unfortunately my site that was XHTML valid befor this change isnīt -XHTML valid any more.

Can yo help me?

Greetings from the german westerwald.

Frank Hamm

Flynn Feb 18, 2009 04:16 AM

Thanks for noticing that. Make the Microsoft expression a comment by changing header.php around line 65-81, from

PHP Code:

<?php // min/max width for IE6:
if(stristr($bfa_ata_layout_width'px') === FALSE && ($bfa_ata_layout_min != "" OR $bfa_ata_layout_max != "" )) { ?>
* html div#wrapper {
    width:expression<?php if($bfa_ata_layout_max_width != "") { ?>(((document.compatMode && 
    document.compatMode=='CSS1Compat') ? 
    document.documentElement.clientWidth : 
    document.body.clientWidth) 
    > <?php echo $bfa_ata_layout_max +1?> ? "<?php echo $bfa_ata_layout_max?>px" : 
    <?php } if($bfa_ata_layout_min_width == "") { ?>"<?php echo $bfa_ata_layout_width?>");}<?php } else { ?>
    (((document.compatMode && 
    document.compatMode=='CSS1Compat') ? 
    document.documentElement.clientWidth : 
    document.body.clientWidth) 
    < <?php echo $bfa_ata_layout_min 1?> ? "<?php echo $bfa_ata_layout_min?>px" : 
    "<?php echo $bfa_ata_layout_width?>")); 
    }
<?php } } ?>

to

PHP Code:

<?php // min/max width for IE6:
if(stristr($bfa_ata_layout_width'px') === FALSE && ($bfa_ata_layout_min != "" OR $bfa_ata_layout_max != "" )) { ?>
* html div#wrapper {
<!--
    width:expression<?php if($bfa_ata_layout_max_width != "") { ?>(((document.compatMode && 
    document.compatMode=='CSS1Compat') ? 
    document.documentElement.clientWidth : 
    document.body.clientWidth) 
    > <?php echo $bfa_ata_layout_max +1?> ? "<?php echo $bfa_ata_layout_max?>px" : 
    <?php } if($bfa_ata_layout_min_width == "") { ?>"<?php echo $bfa_ata_layout_width?>"); -->}<?php } else { ?>
    (((document.compatMode && 
    document.compatMode=='CSS1Compat') ? 
    document.documentElement.clientWidth : 
    document.body.clientWidth) 
    < <?php echo $bfa_ata_layout_min 1?> ? "<?php echo $bfa_ata_layout_min?>px" : 
    "<?php echo $bfa_ata_layout_width?>")); 
-->
    }
<?php } } ?>

This worked for me in IE6/7, FF2/3, Opera and Safari, the min/max width keeps working in IE6, and W3C is happy, too.

frankhamm Feb 18, 2009 04:47 AM

Hi Flyn thanks for your respond:

I have change the part of the header.php as decribed to:

<?php // min/max width for IE6:
if(stristr($bfa_ata_layout_width, 'px') === FALSE && ($bfa_ata_layout_min != "" OR $bfa_ata_layout_max != "" )) { ?>
* html div#wrapper {
<!--
width:expression<?php if($bfa_ata_layout_max_width != "") { ?>(((document.compatMode &&
document.compatMode=='CSS1Compat') ?
document.documentElement.clientWidth :
document.body.clientWidth)
> <?php echo $bfa_ata_layout_max +1; ?> ? "<?php echo $bfa_ata_layout_max; ?>px" :
<?php } if($bfa_ata_layout_min_width == "") { ?>"<?php echo $bfa_ata_layout_width; ?>");}<?php } else { ?>
(((document.compatMode &&
document.compatMode=='CSS1Compat') ?
document.documentElement.clientWidth :
document.body.clientWidth)
< <?php echo $bfa_ata_layout_min + 1; ?> ? "<?php echo $bfa_ata_layout_min; ?>px" :
"<?php echo $bfa_ata_layout_width; ?>"));
-->
}
<?php } } ?>


I have NOT change anything else !!

Than I have check XHTML Validation again and got more error as before. This is the result of my Validation:




Errors found while checking this document as XHTML 1.0 Strict!
Result: 10 Errors, 1 warning(s)
Address: http://www.frank-hamm.de

Validation Output: 10 Errors

1. Warning Line 762, Column 4: S separator in comment declaration.

<!-- Start Of Script Generated By WP-PageNavi 2.40 -->



This may happen if you have consecutive comments but did not close one of them properly. The proper syntax for comments is <!-- my comment -->.
2. Error Line 762, Column 5: invalid comment declaration: found name start character outside comment but inside comment declaration.

<!-- Start Of Script Generated By WP-PageNavi 2.40 -->


3. Info Line 93, Column 0: comment declaration started here.

<!--

4. Error Line 763, Column 135: document type does not allow element "link" here.

…css" type="text/css" media="screen" />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
5. Error Line 765, Column 182: document type does not allow element "link" here.

…/nextgen-gallery/xml/media-rss.php' />



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
6. Error Line 768, Column 89: document type does not allow element "script" here.

…ens.com/current/piclens_optimized.js"></script>



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
7. Error Line 769, Column 72: document type does not allow element "style" here.

…ris/PicLens support --><style type="text/css">



The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
8. Error Line 773, Column 6: end tag for "style" omitted, but OMITTAG NO was specified.

</head>



You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
9. Info Line 67, Column 0: start tag was here.

<style type="text/css">

10. Error Line 762, Column 2: XML Parsing Error: Comment not terminated .

<!-- Start Of Script Generated By WP-PageNavi 2.40 -->


11. Error Line 773, Column 7: XML Parsing Error: Opening and ending tag mismatch: style line 67 and head.

</head>


12. Error Line 1023, Column 7: XML Parsing Error: Opening and ending tag mismatch: head line 4 and html.

</html>


13. Error Line 1023, Column 7: XML Parsing Error: Premature end of data in tag html line 3.

</html>



Any Ideas wants wrong for my site?

Thanks in advance

Frank

Flynn Feb 18, 2009 04:58 AM

Sorry I didn't think about having max-width only (without min-width), I corrected the replacement code above (added one --> in the middle), please try again.

frankhamm Feb 18, 2009 05:04 AM

Hallo Flyn

It works like a charm - thank you SO MUCH

Kind regards from the Westerwald

Frank Hamm


All times are GMT -6. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.