fix erors from validator.w3.org
-
Could you please clarify where exactly do you see these errors on your website?
Hi,
There is this part of the code that causes the error.
.menu-item-480 .wd-design-sized {min-height: 100px; width: 750px; }
.menu-item-382 .wd-design-sized {min-height: 100px; width: 750px; }
.menu-item-479 .wd-design-sized {min-height: 100px; width: 750px; }
.menu-item-485 .wd-design-sized {min-height: 100px; width: 850px; }
.menu-item-383 .wd-design-sized {min-height: 100px; width: 920px; }
.menu-item-489 .wd-design-sized {min-height: 100px; width: 550px; }
.menu-item-491 .wd-design-sized {min-height: 100px; width: 750px; }
Hello,
Yes, you are right. We will review this CSS in our next theme update and try to fix.
Kind Regards
Please also help me fix the bellow error.
It has been fixed already. We just didn’t upload the fix on our demo.
Is there a documentation for how to create this section?
If I import this section to my theme it shows errors.
We are sorry for the inconvenience. This particular fix will be included in our 6.3 update. Try to add the following PHP code snippet to the child theme functions.php file to fix this now
function woodmart_get_gradient_css( $gradient_attr ) {
$gradient_css = explode( '|', $gradient_attr );
$gradient_css[1] = str_replace( array( 'left', 'top', 'right', 'bottom' ), array( 'to left', 'to top', 'to right', 'to bottom' ), $gradient_css[1] );
$result = 'background-image:-webkit-' . $gradient_css[1] . ';';
$result .= 'background-image:' . $gradient_css[1] . ';';
return $result;
}
That code fix the issue on validator but brakes the website.
Try to replace your code with the following one
function woodmart_get_gradient_css( $gradient_attr ) {
$gradient_css = explode( '|', $gradient_attr );
$css = $gradient_css[1];
$webkit_css = $gradient_css[1];
if ( strstr( $css, 'left' ) ) {
$css = str_replace( 'left', 'to right', $gradient_css[1] );
} elseif ( strstr( $css, 'right' ) ) {
$css = str_replace( 'right', 'to left', $gradient_css[1] );
} elseif ( strstr( $css, 'top' ) ) {
$css = str_replace( 'top', 'to bottom', $gradient_css[1] );
} elseif ( strstr( $css, 'bottom' ) ) {
$css = str_replace( 'bottom', 'to top', $gradient_css[1] );
}
$result = 'background-image:-webkit-' . $webkit_css . ';';
$result .= 'background-image:' . $css . ';';
return $result;
}
That worked!
Thank you!!!
The topic ‘fix erors from validator.w3.org’ is closed to new replies.