Rollover Hover Image on HTML Button - html

So I am currently building a landing page for an app that will be soon coming online - However, I have only developed the iOS version so far and will start the android development once the iOS version has gone live.
Now, on my landing page - I have 2 buttons that will redirect to either the Apple store or Google play. For the apple store everything is fine, however I want to add a text that appears when going over the Google Play button which will say something like "coming soon!".
I have tried something but since I am not an expert when it comes to web development, the outcome below clearly shows that swell.. Can anyone help?
.home {
color: #3D464C
}
.home p {
color: #757F86
}
.home__header {
position: relative;
margin-bottom: 3em;
padding: 0 15px;
background: url("../images/jpg/home/header.f03ddb38.jpg") 0 80% no-repeat;
background-size: cover;
text-align: center
}
.home__header h1 {
margin-bottom: 100px;
font-size: 1.8em;
line-height: 1.4
}
.home__header .home__cta--web {
position: absolute;
bottom: -4em;
left: 0;
width: 100%
}
#media (min-width: 769px) {
.home__header {
background-size: cover;
background-position: 50% 80%
}
.home__header h1 {
margin-top: 100px;
margin-bottom: 0;
font-size: 2.4em
}
}
.home__app {
max-width: 300px;
margin: 90px auto 30px;
text-align: center
}
#media (min-width: 769px) {
.home__app {
margin: 30px auto 100px
}
}
.home__app li {
display: inline-block;
margin-top: 0;
width: 50%;
margin-right: -.4em;
vertical-align: middle;
padding: 0 7.5px
}
.home__cta--web {
display: block;
margin-top: 2.5em
}
.home .button {
margin-top: 0;
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
transform: translateY(50%)
}
.home__step {
padding: 50px 15px;
border-bottom: 1px solid #ddd
}
.home__step .illu__container {
margin: 0 auto
}
.home__step__desc {
max-width: 600px;
margin: 0 auto;
text-align: center
}
.home__step h2 {
font-size: 2em;
line-height: 1.4
}
.home__step--04 {
position: relative;
background: url("../images/jpg/home/04.9474e531.svg") no-repeat;
background-size: 80%;
background-position: center 0
}
#media (min-width: 769px) {
.home__step--04 {
background-size: 500px
}
}
.home__step--04 .home__step__illu {
padding: 0 40px;
max-width: 600px;
margin: 0 auto 30px
}
#media (min-width: 769px) {
.home__step {
padding: 100px 15px
}
.home__step--01 .home__step__illu,
.home__step--03 .home__step__illu {
display: inline-block;
margin-top: 0;
width: 50%;
margin-right: -.4em;
vertical-align: middle;
padding: 0 20px
}
.home__step--01 .home__step__illu .illu__container,
.home__step--03 .home__step__illu .illu__container {
margin-right: 0
}
.home__step--01 .home__step__desc,
.home__step--03 .home__step__desc {
text-align: left;
display: inline-block;
margin-top: 0;
width: 50%;
margin-right: -.4em;
vertical-align: middle
}
}
<ul class="home__app hide-for-medium js-dl--app">
<li>
<a href="#" data-store="ios" target="_blank">
<picture class="picture picture--no-background" style="padding-bottom: 34.88%"><img src="assets/images/svg/store/appstore--en.4c7135ef.svg" alt="Download the iOS app"></picture>
</a>
</li>
<li>
<a href="#" data-store="android" target="_blank">
<picture class="picture picture--no-background" style="padding-bottom: 34.88%"><img src="assets/images/svg/store/playstore--en.618c3ad6.svg" alt="Download the Android app"></picture>
</a>
</li>
</ul>
Current Outcome
Current outcome

If I understood your question. You want a the coming soon text to come up whenever anyone hover the playstore button. Please use the code below as reference.
Note : The .container div here is just for example. You should put the code inside .container in your li and make required changes with img src and other styles
.container{
width: 50%;
padding: 50px;
background: #444;
text-align: center;
}
.my-btn-class{
position: relative;
display: block;
}
.my-btn-class img{
max-width: 100%;
}
.my-btn-class:hover > .btn-over{
display: flex;
}
.btn-over{
position: absolute;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.8);
display: none;
top: 0px;
align-items: center;
justify-content: center;
color:#ddd;
font-weight: 600;
}
<div class="container"><!--Example div. Use the below code in your li -->
<a class="my-btn-class" href="#" data-store="android" target="_blank">
<picture class="picture picture--no-background" style="padding-bottom: 34.88%"><img src="http://via.placeholder.com/350x150" alt="Download the Android app"></picture>
<div class="btn-over">
Coming Soon
</div>
</a>
</div>
Hope this helps

Related

CSS Image/Video Grid breaking

i've been having issues with the image/video grid (similar to Instagram). It does have some Ajax like loading more contents on scroll (which is working fine) but the only problem I have which I couldn't seem to fix or find answers anywhere is the grid.
Before you answer, please note the following:
I am using a template called: AdminLTE 3
Template is powered in Bootstrap 4
I am using CSS Instagram Grid Example
Using the latest jQuery (3.6.0)
Here's a video on what I'm talking about and having issues with
Alright, let's get started.
Here is the CSS Styles that I am using:
.uploads-wrapper
{
display: grid;
grid-template-columns: repeat(4, minmax(100px, 293px));
justify-content: center;
grid-gap: 10px;
}
.uploads-content-post
{
cursor: pointer;
position: relative;
display: block;
}
.uploads-content-post-image
{
margin: 0;
}
.uploads-content-post-image img
{
width: 100%;
height: 293px;
vertical-align: top;
}
.uploads-content-post-overlay
{
background: rgba(0,0,0, .4);
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: none;
align-items: center;
justify-content: center;
color: white;
text-align: center;
}
.uploads-content-post:hover .uploads-content-post-overlay
{
display: flex;
}
.uploads-content-post-like
{
width: 80px;
margin: 50%;
font-size: 18px;
font:100%;
margin-left: 100px;
font-weight: 100;
text-align: center;
display: inline-block;
}
#media screen and (max-width: 501px)
{
.uploads-content-post-image img
{
width: 100%;
height: 130px !important;
overflow: hidden;
}
.uploads-content-post-like
{
font-size: 14px;
}
.uploads-content-post-like
{
font-size: 15px;
font:auto;
margin: 50% !important;
}
}
#media screen and (max-width: 600px)
{
.uploads-content-post-image img
{
width: 100%;
height: 140px;
overflow: hidden;
}
.uploads-content-post-like
{
font-size: 15px;
font:auto;
margin: 50% !important;
}
}
#media screen and (max-width: 601px)
{
.uploads-content-post-image img
{
width: 100%;
height: 180px;
overflow: hidden;
}
.uploads-content-post-like
{
font-size: 15px;
font:auto;
margin: 50% !important;
}
}
#media screen and (max-width: 758px)
{
.uploads-content-post-like
{
margin: 50%;
}
.uploads-content-post-like
{
font-size: 15px;
font:auto;
margin: 50% !important;
}
}
#media screen and (max-width: 768px)
{
.uploads-wrapper
{
grid-gap: 3px;
}
.uploads-content-post-image img
{
width: 100%;
height: 220px;
overflow: hidden;
}
.uploads-content-post-like
{
font-size: 15px;
margin: 50% !important;
font:auto;
}
}
Picture example
What I've noticed is that the .uploads-wrapper seems to be the main problem here. I am using PHP as a server side programming language, and just before I call the PHP's "while loop" to fetch more uploads, i've placed this:
<section class="uploads-wrapper" style="margin-top:10px;">
So to put it simple, I don't want the grid to break in to blank column as you can see in the picture/video example. I want it to work like Instagram's grid (I know Instagram's is 3, but I prefer 4 since it fits well in AdminLTE 3 template).
If you require additional information please let me know. I'd like to learn what the issue is here and hopefully i'll be able to fight it in the future if an issue like that or something similar appears in the future or so. Thank you guys for your time answers.
EDIT: As #Ben Souchet mentioned, the code after .uploads-wrapper is as follows:
<div class="uploads-content-post">
<a href="#">
<figure class="uploads-content-post-image">
<img alt src="example.jpg" class="img-fluid" decoding="auto" style="object-fit: cover;">
</figure>
<div class="uploads-media-type-icon-placeholder">
<span class="uploads-media-type-icon">
<i class="fas fa-heart"></i>
</span>
</div>
<span class="uploads-content-post-overlay">
<p>
<span class="uploads-content-post-like">0</span>
</p>
</span>
</a>
</div>
I also don't have a live website, it's in localhost.

All new HTML appears behind an image?

I have been working on a responsive web design, after adding CSS to make a link stay centered on a an image the webpage now displays any new html behind the image. I want to be able to add more things on my webpage but any new html I write disappears.
Link to JSFIDDLEhttps://jsfiddle.net/R4bbit2k17/7yuL4y1p/1/#&togetherjs=MEzytpw3kf`
Because your .banner-inner is using position: absolute in conjunction with taking up 100% of the width and height, you'll need to set a position other than static for your text element(s), along with giving them a z-index greater than the default of 0:
p {
background: red; /* Purely to highlight the text */
position: relative;
z-index: 1;
}
This causes your text to appear on top of your image, and can be seen in the following:
body {
font-family: helvetica;
font-size: 15px;
line-height: 1.5;
padding: 0;
margin: 0;
background-color: #f4f4f4;
}
header {
background: black;
color: white;
padding-top: 20px;
min-height: 45px;
}
header a {
color: white;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
header ul {
margin: 0;
padding: 0;
}
header li {
float: left;
display: inline;
padding: 0 20px 0 20px;
}
header nav {
float: right;
margin-top: 5px;
}
#media only screen and (max-width:1000px) {
.centered {
font-size: 12pt!important;
}
}
#media only screen and (max-width:800px) {
.centered {
font-size: 11pt!important;
}
}
#media only screen and (max-width:600px) {
.centered {
font-size: 10pt!important;
}
}
#media only screen and (max-width:400px) {
.centered {
font-size: 9pt!important;
}
}
#media only screen and (max-width:200px) {
.centered {
font-size: 8pt!important;
}
}
.banner-inner {
width: 100%;
height: 100%;
position: absolute;
text-align: center;
color: white;
}
.centered {
position: absolute;
margin-left: auto;
margin-right: auto;
width: 100%;
height: auto;
margin-top: 20%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
font-size: 12pt;
}
.img {
width: 100%;
height: auto;
float: left;
}
p {
background: red;
position: relative;
z-index: 1;
}
<body>
<header>
<div id="header-inner">
<nav>
<ul>
<li>Home</li>
<li>Courses</li>
<li>About</li>
</ul>
</nav>
</div>
</header>
<section class="section-1">
<div class="banner-inner">
<img class="img" alt="" src="https://d2mt0dng9y3p4j.cloudfront.net/newandimproved/wp-content/uploads/2016/12/shop-with-a-sheriff-mockup.jpg">
<div class="centered">Start Learning</div>
</div>
</section>
<p>ANY HTML ADDED APPEARS BEHIND THE IMAGE AND I CANNOT FIGURE OUT HOW TO CHANGE IT TO APPEAR BENEATH THE IMAGE AS IT WOULD WITH A FRESH HTML PAGE</p>
</body>
Hope this helps!

Content spills out of DIV's bottom

Content of two DIVs spills out of the bottom.
This problem arises not with all browsers. Chrome, IE, Edge - works fine but Firefox, Safari and Chrome for mobile (Android) reflects this problem.
Screenshot: chrome for Android (tablet device)
What's wrong with the code?
html {
height: 100%;
}
body {
background-image: url("background.jpg");
background-size: cover;
background-position: center center;
background-repeat: repeat;
height: 100%;
font-family: 'Times New Roman', Times, sans-serif;
font-size: 16px;
}
#open-hours {
float: left;
}
#contacts {
float: right;
}
.ins {
width: 4%;
height: 4%;
}
hr {
background-color: black;
}
#first-row-1 {
width: 362px;
height: 264px;
margin-right: -4px;
}
#first-row-1 img {
width: 100%;
height: 100%;
}
#first-row-2 {
width: 360px;
height: 262px;
border: 1px solid black;
vertical-align: top;
}
#first-row-2 h4 {
margin-top: 5px;
}
#first-row-1,
#first-row-2,
#second-row-1,
#second-row-2 {
display: inline-block;
}
#first,
#second,
h2 {
text-align: center;
}
#first-row-2 ul,
#second-row-1 ul {
text-align: left;
}
#logo {
width: 358px;
height: 34px;
}
#logo img {
width: 68px;
height: 34px;
}
#second-row-1 {
width: 360px;
height: 262px;
border: 1px solid black;
vertical-align: top;
margin-right: -4px;
}
#second-row-2 {
width: 362px;
height: 264px;
}
#second-row-2 img {
width: 100%;
height: 100%;
}
#second {
margin-top: -4px;
}
#media only screen and (max-width: 766px) {
#first-row-1,
#second-row-2,
#hide,
.ins,
.free-space {
display: none;
}
#open-hours,
#contacts {
float: none;
text-align: center;
}
#first-row-2,
#second-row-1 {
border: 1px solid black;
margin: 0 auto;
display: block;
width: 100%;
}
#second {
margin: 0px;
}
span {
display: block;
}
h2 {
font-size: 18px;
}
h4 {
margin: 5px 0px -10px 0px;
}
#logo {
margin: auto;
}
}
#media only screen and (max-width: 393px) {
#logo {
display: none;
}
#first-row-2,
#second-row-1 {
min-width: 285px;
}
}
<div>
<div id="open-hours">пн-пт 10.00-20.00</div>
<div id="contacts">
<img class="ins" src="phone_pic.png"> text
<img class="ins" src="envelope_pic.png"> <span>text</span>
</div>
<br class="free-space">
<hr>
<br class="free-space">
<h2>Успешный опыт продаж <span id="hide">кондиционеров и климатической техники</span> с 2007 года</h2>
<div id="first">
<div id="first-row-1">
<img src="photo_1.jpg">
</div>
<div id="first-row-2">
<h4>Мы предлагаем широкий спектр оборудования</h4>
<ul>
<li>бытовые кондиционеры</li>
<li>кондиционеры для коммерч. применения</li>
<li>тепловые насосы</li>
<li>осушители воздуха</li>
<li>мультизональные VRF системы</li>
<li>системы бытовой, полупромышленной и промышленной вентиляции</li>
<li>приточно-вытяжные агрегаты</li>
<li>тепловые завесы</li>
</ul>
<div id="logo">
<img src="logo.gif">
<img src="logo.png">
<img src="log.png">
<img src="logo.png">
<img src="logo.jpg">
</div>
</div>
</div>
<div id="second">
<div id="second-row-1">
<h4>Оплата</h4>
<ul>
<li>наличный расчет - в пункте выдачи или по факту доставки продукции</li>
<li>безналичный расчет - оплата физическими и юридическими лицами</li>
</ul>
<h4>Доставка</h4>
<ul>
<li>самовывоз</li>
<li>собственным транспортом компании</li>
<li>почтовыми, курьерскими службами Украины</li>
</ul>
</div>
<div id="second-row-2">
<img src="photo_2.jpg">
</div>
</div>
</div>
Try to replace height of first row and second row divs to min-height and height to auto
#first-row-1{
width: 362px;
height:auto;
min-height: 264px;
margin-right: -4px;
}
#first-row-2{
width: 360px;
height:auto;
min-height: 262px;
border: 1px solid black;
vertical-align: top;
}
I tried to fix your issue without making too many changes, but really the issue is, that you are setting fixed height to child elements and they overflows their parents. I'd suggest to make the layout responsive to save yourself headaches in the future when you'll want to write longer paragraphs.
Without changing the code too much, you could
do following changes to the first and second divs
display: flex;
Desired width, e.g. 2*362
margin: auto;
Following to first-row-1, first-row-2 and the same for second row
delete width and height attributes (or change height to min-height for design purposes)
flex: 1 0 0;

Responsive Design Disfunctional in Firefox

So, I've been building sites for a good while, mainly utilizing Zurb Foundations for layout and responsive features. Recently, for the first time, I decided to hack it out from the ground up using media queries. My CSS is a little wonky (I, for some reason, had to push my second section down by 260px to avoid overlapping the first) but does the job just fine in Chrome. In Firefox and Safari however the two sections remain atop one another. Can anyone recommend a CSSolution for my issue?
Thanks,
John
/*home.css*/
p {
font-family: 'Droid Sans';
font-size: .8em;
}
h1, h2, h1 > a {
font-size: 1.2em;
font-weight: normal;
}
.landscape {
background-image: url("../img/landscape1.jpg");
background-size: cover;
border-radius: 25px;
height: 327px;
margin: 0 auto;
}
/*Styling for the Request A Quote form*/
.quote {
background-color: green;
font-size: .7em;
color: white;
z-index: -1;
}
.quote > h2 {
color: #fff;
font-size: 1.2me
}
input {
display: block;
width:180px;
color:black;
border-radius: 6px;
border: 1px solid #fff;
padding: 7px;
}
#submit {
width: 80px;
}
/*Landscape image settings for large screens*/
#media screen and (min-width: 900px) {
.landscape {
width: 890px;
height: 327px;
max-width: 1000px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Form styles for large screen*/
#media screen and (min-width: 700px) {
.quote {
float: right;
width: 220px;
height: 327px;
border-radius: 0 25px 25px 0;
padding: 0 15px;
}
.offer {
display: none;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Landscape styles for 700 > 900px screens*/
#media screen and (max-width: 900px) {
.landscape {
height: 327px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
#media screen and (max-width: 700px) {
.landscape {
width: 100%;
height: 200px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.quote {
position: relative;
top: 200px;
border-radius: 0 0 25px 25px;
padding: 10px 0 10px 0;
height: 240px;
float: none;
width: 60%;
}
form, .quote > h2 {
padding: 0 10px;
}
input {
width: 250px;
}
.offer {
display: block;
float: right;
background-color: #A8CD1B;
position: relative;
top: -60px;
z-index: 1;
width: 40%;
min-width: 120px;
height: 240px;
padding: 10px 20px;
border-radius: 0 0 25px 0;
}
.offer > p {
color: black;
font-size: .8em;
}
.your-yard-left {
width: 100%;
display: block;
position: relative;
top: -50px;
border-radius: 25px 0 0 25px;
width: 70%;
}
.your-yard-right {
width: 100%;
display: block;
position: relative;
top: -50px;
height: 260px;
}
}
#media screen and (max-width: 650px) {
.offer {
width: 30%;
}
.quote {
width: 70%;
}
}
#media screen and (max-width: 500px) {
.offer {
display: none;
}
.quote {
width: 100%;
}
.your-yard-left {
float: none;
position: relative;
border-radius: 25px 25px 25px 25px;
top: 260px;
overflow: none;
width: 100%;
}
.your-yard-right {
float: none;
position: relative;
top: 260px;
display: none;
}
}
.your-yard-left {
background-color: #A8CD1B;
float: left;
margin-top: 10px;
padding-right: 2%;
}
.your-yard-left > h2, .your-yard-left > p {
margin-left: 10px;
}
.your-yard-right {
background-color: green;
border-radius: 0 25px 25px 0;
margin-top: 10px;
width: 30%;
float: right;
z-index: 1;
overflow: hidden;
}
.your-yard-right img {
max-height: 150px;
display: block;
text-align: center;
margin: 10px auto;
}
.center {
clear: both;
}
#media screen and (min-width: 1010px) {
.your-yard {
max-width: 1000px;
}
.wrap {
max-width: 1000px;
margin: auto;
}
}
.wrap {
display: flex;
}
<!DOCTYPE html>
<html>
<head>
<title>Helping Hand Lawn Care</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="css/normalize.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/menu.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<!--#include virtual="includes/nav.inc"-->
<div class="landscape">
<div class="quote">
<h2>Request A Quote!</h2>
<form>
<input type="text" id="name" placeholder="Name"><br/>
<input type="text" id="email" placeholder="Email"><br/>
<input type="text" id="phone" placeholder="Phone"><br/>
<input type="text" id="address" placeholder="Address"><br/>
<input type="submit" id="submit" value="Submit">
</form>
</div>
<div class="offer">
<h2>We'll Be In Touch</h2>
<p>Drop us a message and we'll have one of our certified landscape technicians come by, inspect your property and give you a quote. Our prices are always fair and our service always top notch. See what </p>
</div>
</div>
<div class="wrap">
<div class="your-yard-left">
<h2 class="center ">Your Yard, Your Pride, Your Way</h2>
<p>Since 2003, Helping Hand Lawn Care has serviced homes, businesses and governmental facilities throughout the Central Florida area in full-service landscape maintenance, installation, irrigation and pest control company. Our team has the experience, knowledge and dedication it takes to invision and execute the projects it takes to get your lawn looking great.<p>
<p>Contact us today to have a landscape professional offer a quote! We offer seasonal and annual packages for all size properties.
</div>
<div class="your-yard-right">
<img src="img/landscape2.jpg">
</div>
</div>
<!--
<div class="center">
<h2>Why Helping Hand?</h2>
<ul>
<li>Quality work</li>
<li>Consistent arrivals</li>
<li>Outstanding customer service</li>
<li>Over 15+ years industry experience</li>
</div>
-->
<script src="js/vendor/jquery.js"></script>
<script src="js/menu.js"></script>
<!-- Other JS plugins can be included here -->
</body>
</html>
I have add one property this media query
#media screen and (max-width: 700px) {
.wrap {
display: inherit !important;
}
}
/*home.css*/
p {
font-family: 'Droid Sans';
font-size: .8em;
}
h1, h2, h1 > a {
font-size: 1.2em;
font-weight: normal;
}
.landscape {
background-image: url("../img/landscape1.jpg");
background-size: cover;
border-radius: 25px;
height: 327px;
margin: 0 auto;
}
/*Styling for the Request A Quote form*/
.quote {
background-color: green;
font-size: .7em;
color: white;
z-index: -1;
}
.quote > h2 {
color: #fff;
font-size: 1.2me
}
input {
display: block;
width:180px;
color:black;
border-radius: 6px;
border: 1px solid #fff;
padding: 7px;
}
#submit {
width: 80px;
}
/*Landscape image settings for large screens*/
#media screen and (min-width: 900px) {
.landscape {
width: 890px;
height: 327px;
max-width: 1000px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Form styles for large screen*/
#media screen and (min-width: 700px) {
.quote {
float: right;
width: 220px;
height: 327px;
border-radius: 0 25px 25px 0;
padding: 0 15px;
}
.offer {
display: none;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
/*Landscape styles for 700 > 900px screens*/
#media screen and (max-width: 900px) {
.landscape {
height: 327px;
}
.your-yard-left {
border-radius: 25px 0 0 25px;
width: 70%;
}
}
#media screen and (max-width: 700px) {
.landscape {
width: 100%;
height: 200px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.quote {
position: relative;
top: 200px;
border-radius: 0 0 25px 25px;
padding: 10px 0 10px 0;
height: 240px;
float: none;
width: 60%;
}
form, .quote > h2 {
padding: 0 10px;
}
input {
width: 250px;
}
.offer {
display: block;
float: right;
background-color: #A8CD1B;
position: relative;
top: -60px;
z-index: 1;
width: 40%;
min-width: 120px;
height: 240px;
padding: 10px 20px;
border-radius: 0 0 25px 0;
}
.wrap {
display: inherit !important;
}
.offer > p {
color: black;
font-size: .8em;
}
.your-yard-left {
width: 100%;
display: block;
position: relative;
top: -50px;
border-radius: 25px 0 0 25px;
width: 70%;
}
.your-yard-right {
width: 100%;
display: block;
position: relative;
top: -50px;
height: 260px;
}
}
#media screen and (max-width: 650px) {
.offer {
width: 30%;
}
.quote {
width: 70%;
}
}
#media screen and (max-width: 500px) {
.offer {
display: none;
}
.quote {
width: 100%;
}
.your-yard-left {
float: none;
position: relative;
border-radius: 25px 25px 25px 25px;
top: 260px;
overflow: none;
width: 100%;
}
.your-yard-right {
float: none;
position: relative;
top: 260px;
display: none;
}
}
.your-yard-left {
background-color: #A8CD1B;
float: left;
margin-top: 10px;
padding-right: 2%;
}
.your-yard-left > h2, .your-yard-left > p {
margin-left: 10px;
}
.your-yard-right {
background-color: green;
border-radius: 0 25px 25px 0;
margin-top: 10px;
width: 30%;
float: right;
z-index: 1;
overflow: hidden;
}
.your-yard-right img {
max-height: 150px;
display: block;
text-align: center;
margin: 10px auto;
}
.center {
clear: both;
}
#media screen and (min-width: 1010px) {
.your-yard {
max-width: 1000px;
}
.wrap {
max-width: 1000px;
margin: auto;
}
}
.wrap {
display: flex;
}
<!DOCTYPE html>
<html>
<head>
<title>Helping Hand Lawn Care</title>
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="css/normalize.css">
<link href='https://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/menu.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<!--#include virtual="includes/nav.inc"-->
<div class="landscape">
<div class="quote">
<h2>Request A Quote!</h2>
<form>
<input type="text" id="name" placeholder="Name"><br/>
<input type="text" id="email" placeholder="Email"><br/>
<input type="text" id="phone" placeholder="Phone"><br/>
<input type="text" id="address" placeholder="Address"><br/>
<input type="submit" id="submit" value="Submit">
</form>
</div>
<div class="offer">
<h2>We'll Be In Touch</h2>
<p>Drop us a message and we'll have one of our certified landscape technicians come by, inspect your property and give you a quote. Our prices are always fair and our service always top notch. See what </p>
</div>
</div>
<div class="wrap">
<div class="your-yard-left">
<h2 class="center ">Your Yard, Your Pride, Your Way</h2>
<p>Since 2003, Helping Hand Lawn Care has serviced homes, businesses and governmental facilities throughout the Central Florida area in full-service landscape maintenance, installation, irrigation and pest control company. Our team has the experience, knowledge and dedication it takes to invision and execute the projects it takes to get your lawn looking great.<p>
<p>Contact us today to have a landscape professional offer a quote! We offer seasonal and annual packages for all size properties.
</div>
<div class="your-yard-right">
<img src="img/landscape2.jpg">
</div>
</div>
<!--
<div class="center">
<h2>Why Helping Hand?</h2>
<ul>
<li>Quality work</li>
<li>Consistent arrivals</li>
<li>Outstanding customer service</li>
<li>Over 15+ years industry experience</li>
</div>
-->
<script src="js/vendor/jquery.js"></script>
<script src="js/menu.js"></script>
<!-- Other JS plugins can be included here -->
</body>
</html>
So, the addition of
.wrap {
display: inherit !important
}
resolved the issue of differences in Safari and Firefox compared to Chrome. For the problem with the second section rendering vertically I noticed I had included padding-right of 2% to one of the divs without accounting for this in the divs width. Thanks for the help!

What's the best way of laying this out? Horizontal Rule?

I am trying to align a horizontal rule with the white line in my menu. And I want that alignment to stay when viewed on different screens. What's my best option for doing that? Image of what it needs to look like:
* {
margin: 0;
}
#font-face {
font-family: jaapokkisubtract;
src: url('jaapokkisubtract.ttf');
}
body {
background-color: #ca3600;
}
#head {
height: 65px;
border-bottom: 3px solid white;
float: right;
width: 51%;
}
h1 {
color: white;
margin: 10px 0 0 10px;
font-family: jaapokkisubtract;
font-size: 50px;
float: left;
}
#work_btn {
display: block;
width: 96px;
height: 68px;
background: url(http://i.imgur.com/7m1Eh9j.gif) no-repeat 0 0;
overflow: hidden;
text-indent: -9999px;
float: right;
}
#work_btn:hover {
background-position: 0 -68px;
}
#resume_btn {
display: block;
width: 125px;
height: 68px;
background: url(http://i.imgur.com/x2eaW4T.gif) no-repeat 0 0;
overflow: hidden;
text-indent: -9999px;
float: right
}
#resume_btn:hover {
background-position: 0 -68px;
}
<h1>Alexander</h1>
<div id="menu">
<a id="resume_btn" href="resume.html" title="Resume">Resume</a>
<a id="work_btn" href="index.html" title="Work">Work</a>
<div id="head"></div>
</div>
You can achieve this by modifying slightly the CSS and HTML code, and using translation to move the menu items to the center of the screen.
To do this you need to:
Wrap everything in div with the border-bottom (e.g.: #head)
Float the page title (h1) to the left (although maybe it would be better to change its position to absolute or it may affect the menu links)
Wrap all the navigation elements in a div (e.g.: #menu) with absolute position positioned in the center of the #head (left:50%)
Transform the #menu div to translate it 50% of its width to the left. This could be achieved by adding this to its style:
transform:translate(-50%, 0%)
You can see a demo working here: http://jsfiddle.net/o4ff4thc/ or below:
* {
margin: 0;
}
#font-face {
font-family: jaapokkisubtract;
src: url('jaapokkisubtract.ttf');
}
body {
background-color: #ca3600;
}
#head {
height: 65px;
border-bottom: 3px solid white;
}
h1 {
color: white;
margin: 10px 0 0 10px;
font-family: jaapokkisubtract;
font-size: 50px;
float: left;
}
#work_btn {
display: inline-block;
width: 96px;
height: 68px;
background: url(http://i.imgur.com/7m1Eh9j.gif) no-repeat 0 0;
overflow: hidden;
text-indent: -9999px;
}
#work_btn:hover {
background-position: 0 -68px;
}
#resume_btn {
display:inline-block;
width: 125px;
height: 68px;
background: url(http://i.imgur.com/x2eaW4T.gif) no-repeat 0 0;
overflow: hidden;
text-indent: -9999px;
}
#resume_btn:hover {
background-position: 0 -68px;
}
#menu {
position:absolute;
left:50%;
transform:translate(-50%,0%);
height:20px;
width:245px;
}
<div id="head">
<h1>Alexander</h1>
<div id="menu">
<a id="resume_btn" href="resume.html" title="Resume">Resume</a>
<a id="work_btn" href="index.html" title="Work">Work</a>
</div>
</div>