Style.css : can modify the footer but not the header ?!
-
Hello everyone,
I am using WordPress 4.4.2 with no plugins and I am trying to write my own theme from scratch. Here is something I don’t understand : when trying to modify de site style, I can customise the footer but the header stay the same. The first thing I want to do is showing a border-bottom but nothing happens.THE CODE:
this is style.css:
/* Theme Name: theme_01 Version: 1.0 */ body { font-family: Arial, sans-serif; font-size: 16px; color: #666; } a:link, a:visited{ color:#006ec3; } p{ line-height: 1.65em; } /* General Layout*/ div.container { max-width: 620px; margin: 0 auto; padding-left: 0px; padding-right: 0px; } article.post{ border-bottom: 2px dotted #999; } article.post:last-of-type{ border-bottom : none; } /*Header (DOES NOT WORK ???)*/ .site-header{ margin-bottom: 20px; border-bottom: 2px solid #999; } /*Footer*/ .site-footer{ margin-top: 20px; border-top: 2px solid #999; } /*Navigation menus reset*/ .site-nav ul { margin:0; padding:0; } .site-nav ul: before, .site-nav ul: after {content: ""; display: table;} .site-nav ul after{clear: both;} .site-nav ul {*zoom: 1;} .site-nav ul li { list-style: none; float: left; } /*Site Header Menu*/ .site-header nav ul li a :link, .site-header nav ul li a:visited{ display: block; padding: 10px 18px; border: 1px solid #999; border-bottom : 1px solid #999; }
also this is the header.php :
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo('charset');?>"> <meta name="viewport" content="width=device-width"> <title><?php bloginfo('name'); ?> </title> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <div class="container"> <header class="name"> <h1><a href="<?php echo home_url(); ?>"> <?php bloginfo('name'); ?> </a> </h1> <h5><?php bloginfo('description');?></h5> <nav class="site-nav"> <ul> <?php $args = array('theme_location' => 'primary'); wp_nav_menu($args); ?> </ul> </nav> </header>
and footer.php:
<footer class="site-footer"> <p><?php bloginfo('name'); ?> © - <?php echo date('Y')?></p> <nav class="site-nav"> <ul> <?php $args = array('theme_location' => 'footer'); wp_nav_menu(); ?> </ul> </nav> </footer> </div> <?php wp_footer(); ?> </body> </html>
and functions.php:
<?php function theme_ressources(){ wp_enqueue_style('style', get_stylesheet_uri()); } add_action('wp_enqueue_scripts','theme_ressources'); //Navigation Menus register_nav_menus(array( 'primary' => __('Primary Menu'), 'footer' => __('Footer Menu'), ));
WHAT IS HAPPENING :
Everything works great (the border-top of the footer is shown) except the .site-header customisation.
Thank you so much for your replies,
and have a good day ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Style.css : can modify the footer but not the header ?!’ is closed to new replies.