I am developing a wordpress theme and i addedd inline_style css into my function.php. all was going fine but when i added @media for set min-max width, at that time it showing me a warning error. plz help me, how can i added @media css into inline_style. I already mentioned the “line 192”. Thank you advanced.
<?php
function doggo_inline_styles_method() {
wp_enqueue_style(
'custom-style',
get_template_directory_uri() . 'assets/css/custom_script.css'
);
global $doggo_redux;
$top_h_l_hight = $doggo_redux['top_header_height'];
$top_h_bg_color = $doggo_redux['top_h_bg_color'];
$top_h_icon_color = $doggo_redux['top_h_icon_color']['regular'];
$top_h_icon_size = $doggo_redux['top_header_icon_size'];
$menu_height = $doggo_redux['menu_height'];
$menu_bg_color = $doggo_redux['menu_bg_color'];
$footer_bg = $doggo_redux['footer_bg_color'];
$footer_heading_color = $doggo_redux['footer_heading_color'];
$custom_css = "
.container-fluid.top-bar{
line-height: {$top_h_l_hight}px;
background: {$top_h_bg_color};
}
.top-bar .contact-details i {
color:{$top_h_icon_color};
}
ul.contact-details.float-left li i, ul.social-list.float-right.list-inline li i {
font-size: {$top_h_icon_size}px;
}
.navbar.container-fluid {
height: {$menu_height}px;
}
footer.footer {
background: {$footer_bg}!important;
}
footer.footer h5 {
color: {$footer_heading_color}!important;
}
@media (max-width: 1200px){
.container {
background: {$menu_bg_color}; *** this is line num 192 ***
z-index: 100;
}
}
";
wp_add_inline_style( 'custom-style', $custom_css );
}
add_action( 'wp_enqueue_scripts', 'doggo_inline_styles_method' );
?>
I tried to add @media
into function.php but I didn’t. How can I added these codes without error show. Thanks.