Michael Smith
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingis this code still in the style.css of the child theme
.site-header .home-link { display: block; margin: 0 auto; max-width: 100%; min-height: 0px; text-align: center; text-decoration: none; width: 100%; }Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingOK i think your right and the custom-header.php file is inserting the background. Basicly that line is saying to insert the header image into the header of the site if one exists.
Try checking bot the parent and child theme for a header image. if you find an active image in either appearance > header or appearance > background turn them off in both themes.
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workinghmm… that was not expected. Ok replace the .site-header code you just put in your styles.css child them with the following.
.site-header {
background: url(“#”) no-repeat scroll center top #000;
background:color: #000;
}
if that doesn’t work we need to find out if your site is calling css code from some other place.Do you have any other css files as part of your chlid? Look for .css as a file extension.
Do you have any other .css files in the parent theme?
check to make sure you don’t have .site-header code in your header.php, or in page.php
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingYup, working this one step at a time.
You still have a background image in your header, from what i see i think it is getting added via css. Take a look at line 45 of your styles.css and see if you find the following code
.site-header { background: url("http://www.oliviaontheriviera.com/wp-content/uploads/2014/06/oliviaontheriviera-header-180x1200.jpg") no-repeat scroll center top rgba(0, 0, 0, 0); }if you do, delete it. If you do not then add the following to the end of styles.css in your child theme.
.site-header {
background-color: #000;
}Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingOK then add the following to the end of your style.css file in your child theme
.site-header .home-link { display: block; margin: 0 auto; max-width: 100%; min-height: 0px; text-align: center; text-decoration: none; width: 100%; }Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingOK lets check a few things under appearance >? customize
site title and tag line – the display header text box should be unchecked
header image should be no image
background image should be no imageI do see the replacement header in place, and it is responsive. so at least that seems to be working
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingI thinks its set up right. Turn off the header image in the theme.
and don’t add rosamundwo’s code snipit i
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingOh and Olivia if your parent theme is active that would explain why i don’t see the new div in the header.php file. You may have the php modified correctly but if im going to trouble shoot you need to leave the child theme active.
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingthe css code should be placed into style.css in your child theme. Without that code in place the header will not be responsive.
I still don’t see the new div in the php file
Lets try getting the php in place in a different way.
• Download the header.php file from the link below.
• Open in in a text editor like notepad.
• Copy the whole thing from beginning to end.
• Then replace everything in your child header.php file the code from the linked header.php file.https://www.dropbox.com/s/19309umi85kv39j/header.php
Also, Are your removing the old header image by going to Appearance > Customize > Header Image and clicking remove image? This won’t work if you have the old header image in place.
@rosamundwo – the problem we are having is that the theme Olivia is using sets the header image as a background image that will not scale down responsively. I could’t find a way to fix that via css alone so I’m having her add an html element into her header.php file that will react appropriately. The css Code you posted doesn’t’ address the responsive problem we are trying to solve. You can see the result I’m trying get on Olivia’s site here: http://sandbox.michaelsmithportfolio.com/
If know of a simpler way to achieve this effect i would love to know how.
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingYour active theme should be your child theme, but before you start trying to reactive your child I would copy the header.php file from your parent and paste it into your child. Then when you reactivate the child check to make sure the site still looks the same as it did with an active partent.
If everything still looks the same make sure this css code is in the custom css file you are using.
#headImage { display: block; float: none; margin: 0 auto; text-align: center; width: 100%; }At this point refreshing your site will not show any changes at all. that is expected.
next place the following code in the child theme header.php file just below the <header id=”masthead” class=”site-header” role=”banner”> line (see the example above if you need clarification.) Dont’t forget to trade out the image in the following code for your header image instead of mine.
<div id="headImage"> <img src="http://sandbox.michaelsmithportfolio.com/wp-content/uploads/2014/06/SandboxHeader.jpg" alt="SandboxHeader.jpg" width="960" height="180" class="alignnone size-full wp-image-26" /> </div>If you did everything correctly the header of your site will look like the header at http://sandbox.michaelsmithportfolio.com/
Forum: Themes and Templates
In reply to: [Stargazer] change header colorNo worries, happy to help.
Forum: Themes and Templates
In reply to: [Stargazer] change header colorSure david,
All you need to do is add the following code to the custom CSS file you have in place. Just add it at the end of the file and your header will match the rest of your page.
.custom-background #container > .wrap { background-color: #fbe0b9; margin-bottom: 50px; margin-top: 50px; max-width: 1175px; }Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingOh and stole your header image and applied to sandbox just to double check things. This solution still works, but it looks like you have a white line in the image you will want to clean up after you get the header fixed.
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingThat leads me to believe the header.php file in your child theme is not overwriting the header.php file in your parent theme. (see link) The link is a screen capture of Sanbox compared to Olivia with the live code showing in the Chrome inspector. The new Div is still not showing on your site (your site is on the right)
I would check the following things
a) the name of the header.php on both the parent and child are exactly the same.
b) the parent theme is the active theme in WordPress
c) the changes you make to the child css are working on the site (you have been making changes in the child them already so i doubt this is a problem)Unfortunatly, I am just guessing at the problem now. I don’t know of any other way to check for the problems without logging in.
https://www.dropbox.com/s/ewzb65y9dft6w79/sandbox%20vs%20olivia.jpg
Forum: Themes and Templates
In reply to: [Suits] Responsive header not workingIt doesnt look like the html code in the header.php file was updated correctly. See the snipit below. The code from my site has the added div, but the code from your site does not.
<!-- from Olivia --> <header id="masthead" class="site-header" role="banner"> <a class="home-link" href="http://www.oliviaontheriviera.com/" title="OLIVIA ON THE RIVIERA" rel="home"> <h1 class="site-title">OLIVIA ON THE RIVIERA</h1> <h2 class="site-description">Fashion and Lifestyle blog live from the French Riviera</h2> </a> <!-- From sandbox --> <header id="masthead" class="site-header" role="banner"> <div id="headImage"> <img src="http://sandbox.michaelsmithportfolio.com/wp-content/uploads/2014/06/SandboxHeader.jpg" alt="SandboxHeader.jpg" width="960" height="180" class="alignnone size-full wp-image-26"> </div> <a class="home-link" href="http://sandbox.michaelsmithportfolio.com/" title="Sandbox" rel="home"> <h1 class="site-title">Sandbox</h1> <h2 class="site-description">Its my playground</h2> </a>I would double check to make sure your child theme is working correctly. You may already have this but here is the link from wordpress.org on how to create a child theme. http://codex.wordpress.org/Child_Themes