Fixing gap below extra header image and fixing size
-
Aloha all!
First off, I’m not super versed in coding. I am, however, a very good self-teacher and able to pull off basic code tweaks with the help of google. I’m building a site for a friend and I played around with my header.php for a bit to add an extra header image above the menu so I can have that, as well as the built-in header image the theme comes with (displays below the menu).
That said, I had to do a fair bit of tweaking to get the new header image to display centered and properly – however, when I move to a smaller screen the header looks slightly aligned-left rather than always displaying dead-centered over the content.I’d like to figure out how to fix this, and if possible, also add a function so that regardless of how much you zoom in the image always displays at the same width on the screen (kind of like how the menu bar functions).
Secondly, in the process of adding the new code I ran into another placement issue – the image was displaying overlapped on the menu bar. I fixed this by adding some margin to the bottom, but regardless of how much or little I change it everything below 10px displays with a gap between the image and menu, and everything over 10px sends the image to the bottom of the page.
Here’s the page: https://www.lopakasalohaadventures.com
Here is the header.php function I added<div id= "extra-header"> <img src="https://www.lopakasalohaadventures.com/home/wp-content/uploads/2013/11/LopakaHeader.png" style="center"> </div>
here is it’s placement in header.php
<body <?php body_class(); ?>> <?php themezee_wrapper_before(); // hook before #wrapper ?> <div id="wrapper" class="hfeed"> <?php themezee_header_before(); // hook before #header ?> <div id= "extra-header"> <img src="https://www.lopakasalohaadventures.com/home/wp-content/uploads/2013/11/LopakaHeader.png" style="center"> </div> <div id="header-wrap"> <header id="header" class="container clearfix" role="banner">
And here is my callout in the style.php
#header { padding: 3em; } #extra-header { text-align: center; left-margin: auto; right-margin: auto; bottom: 5px; position: top; } #wrap { clear: both; padding: 1.5em 1.5em 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
I know I’m an ugly coder, but I make due with what I have and I enjoy playing around…
Also: I have a side-question. Can anybody tell me why the 1100px wide image I made in illustrator and exported as a .png somehow becomes 5000px wide every time I upload it to WP? I’m hosting on Bluehost and just upgraded to the newest build of wordpress before I took over this project
Thanks guys – appreciate all the help!
- The topic ‘Fixing gap below extra header image and fixing size’ is closed to new replies.