I need help with the drop down menus. I encounter this issue when I hover on top of the tabs with hidden drop down menus. I followed the W3Schools instructions
The W3Schools instructions asked me to use position: absolute but if I do that instead of position: relative the drop down menus won't even open.
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .projects {
color: #fff39e;
border: none;
background-color: #f9fae8;
font-size: 18px;
padding: 12px;
text-decoration: none;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 900;
line-height: 25px;
margin: 0;
}
.dropdown-projects {
display: none;
position: relative;
color: #f9fae8;
background-color: #101119;
min-width: 160px;
z-index: 2;
}
.dropdown-projects a {
float: none;
color: #f9fae8;
padding: 10px;
text-decoration: none;
display: block;
text-align: left;
font-size: 16px;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 400;
line-height: 0.6;
margin: 0;
}
.dropdown-projects a:hover {
color: #fff39e !important;
}
.dropdown:hover .dropdown-projects {
display: block;
}
.dropdown .dilettante {
color: #caf5ce;
border: none;
background-color: #f9fae8;
font-size: 18px;
padding: 12px;
text-decoration: none;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 900;
line-height: 25px;
margin: 0;
}
.dropdown-dilettante {
display: none;
position: relative;
color: #f9fae8;
background-color: #101119;
min-width: 160px;
z-index: 2;
}
.dropdown-dilettante a {
float: none;
color: #f9fae8;
padding: 10px;
text-decoration: none;
display: block;
text-align: left;
font-size: 16px;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 400;
line-height: 0.6;
margin: 0;
}
.dropdown-dilettante a:hover {
color: #caf5ce !important;
}
.dropdown:hover .dropdown-dilettante {
display: block;
}
<div class="dropdown">
<button class="projects">PROJECTS</button>
<div class="dropdown-projects">
ART DIRECTION
BRANDING
GRAPHIC DESIGNS
PHOTOGRAPHY
</div>
<button class="dilettante">DILETTANTE</button>
<div class="dropdown-dilettante">
INSTAGRAM
QUOTES
PLAYLIST
GOODREADS
FILMS
</div>
</div>
In the HTML, wrap both menu items in <div class="dropdown">.
In the CSS, add position: absolute on hover.
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .projects {
color: #fff39e;
border: none;
background-color: #f9fae8;
font-size: 18px;
padding: 12px;
text-decoration: none;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 900;
line-height: 25px;
margin: 0;
}
.dropdown-projects {
display: none;
position: relative;
color: #f9fae8;
background-color: #101119;
min-width: 160px;
z-index: 2;
}
.dropdown-projects a {
float: none;
color: #f9fae8;
padding: 10px;
text-decoration: none;
display: block;
text-align: left;
font-size: 16px;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 400;
line-height: 0.6;
margin: 0;
}
.dropdown-projects a:hover {
color: #fff39e !important;
}
.dropdown:hover .dropdown-projects {
display: block;
/* added */
position: absolute;
}
.dropdown .dilettante {
color: #caf5ce;
border: none;
background-color: #f9fae8;
font-size: 18px;
padding: 12px;
text-decoration: none;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 900;
line-height: 25px;
margin: 0;
}
.dropdown-dilettante {
display: none;
position: relative;
color: #f9fae8;
background-color: #101119;
min-width: 160px;
z-index: 2;
}
.dropdown-dilettante a {
float: none;
color: #f9fae8;
padding: 10px;
text-decoration: none;
display: block;
text-align: left;
font-size: 16px;
font-family: 'Lato', sans-serif, Helvetica;
font-weight: 400;
line-height: 0.6;
margin: 0;
}
.dropdown-dilettante a:hover {
color: #caf5ce !important;
}
.dropdown:hover .dropdown-dilettante {
display: block;
}
<div class="dropdown">
<button class="projects">PROJECTS</button>
<div class="dropdown-projects">
ART DIRECTION
BRANDING
GRAPHIC DESIGNS
PHOTOGRAPHY
</div>
</div>
<div class="dropdown">
<button class="dilettante">DILETTANTE</button>
<div class="dropdown-dilettante">
INSTAGRAM
QUOTES
PLAYLIST
GOODREADS
FILMS
</div>
</div>
use absolute position in you dropdown and following code for display
.projects:hover + div.dropdown-projects {
display: block;
}
.dilettante:hover + div.dropdown-dilettante {
display: block;
}
here is the working file
also your code need lots of other improvement.
Does this help? JSFiddle
You'll have to edit CSS accordingly
.navbar {
overflow: hidden;
background-color: #fff;
/* Chnage the Background */
padding: 10px;
font-size: 16px;
font-family: 'Lato', sans-serif, Helvetica;
line-height: 0.6;
}
.navbar a {
float: left;
font-size: 16px;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: #FFF39E;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
font-weight: 900;
margin: 0;
}
.navbar a:hover,
.dropdown:hover .dropbtn {
background-color: transparent;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #000;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: #fff;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
#dilettante {
color: #E1F7DB !important;
}
#projects {
color: #FFF39E;
}
.dropdown-content a:hover {
background-color: #000;
color: #FFF39E;
}
#dilettantedropdown a:hover {
color: #CAF5CE;
}
.dropdown:hover .dropdown-content {
display: block;
}
<div class="navbar">
<div class="dropdown">
<button class="dropbtn" id="projects">PROJECTS</button>
<div class="dropdown-content">
ART DIRECTION
BRANDING
GRAPHIC DESIGNS
PHOTOGRAPHY
</div>
</div>
<div class="dropdown">
<button class="dropbtn " id="dilettante">DILETTANTE
</button>
<div id="dilettantedropdown" class="dropdown-content dilettante">
INSTAGRAM
QUOTES
PLAYLIST
GOODREADS
FILMS
</div>
</div>
</div>
Related
I am having trouble trying to remove a gap between a navigation bar and a div that is supposed to show under the navigation bar.
Here's my code:
<%-- Nav Bar --%>
<ul>
<li> <a class="welcometitle"> Welcome back! <asp:Label ID="lblusuario" runat="server" ForeColor="#99ccff" Font-Bold="true"></asp:Label></a></li>
<li class="dropdown">
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn"> <i class="fa fa-bars"></i> </button>
<div id="myDropdown" class="dropdown-content">
Home
About
Contact
</div>
</div>
</li>
</ul>
<%-- Iframe --%>
<div class="h_iframe">
<iframe src="inicio.aspx" name="ventana" ></iframe>
</div>
This is the CSS I'm using:
body
{
font: 14px 'Segoe UI', 'Helvetica Neue', 'Droid Sans', Arial, Tahoma, Geneva, Sans-serif;
overflow-y: hidden;
}
html, body {
height: 100%;
width: 100%;
margin: 0;
}
.h_iframe iframe {
width: 100%;
height: 100%;
margin-top: 0;
}
.h_iframe {
height: 100%;
width: 100%;
margin-top: 0;
top: 0;
z-index: -1;
padding-left: 159px;
position: fixed absolute
}
.welcometitle {
float: left;
display: block;
color: white;
text-align: center;
padding: 1px 16px;
padding-top: 12px;
text-decoration: none;
font-size: 20px;
font-weight: 500;
}
ul {
list-style-type: none;
margin: 0;
overflow: hidden;
background-color: #006cb4;
padding-left: 163px;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
color: white;
}
.active {
background-color: #4CAF50;
}
.li input[type=text] {
padding: 6px;
margin-top: 8px;
font-size: 25px;
border: none;
}
img {
width: 92%;
padding-left: 8px;
margin: 0;
top: 0;
}
.dropbtn {
background-color: #111;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: #d4d4d4;
color: #111;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
right: 0;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
/*display: block;*/
}
.dropdown a:hover {background-color: #ddd;}
.show {display: block;
position: fixed;
}
.active {
background-color: #4CAF50;
}
I have tried different things but it just doesn't seem to work. Can you find where I'm messing it up?
You can add some little CSS to the iframe class.
Here is the code:
.h_iframe {
margin-top: -20px;
}
https://jsfiddle.net/0q5s98sL/
Below is attached a jsfiddle, currently the drop down menu doesn't work and I want it to be position in the top right corner instead of the left,
If possible id like the drop down menu to fill up the entire navbar when selected as this web app is solely for mobile devices,
does anyone have any ideas of how I can solve these issues?
Thanks in advance
body {
background-color: black;
}
#icon {
max-width: 200px;
margin: 1% auto;
}
#navlogo {
position: absolute;
right: 3rem;
height: 4rem;
top: 2rem;
line-height: 100px;
}
footer {
width: 100%;
background: black;
color: white;
}
.fa {
padding: 20px;
font-size: 30px;
color: white;
}
.fa:hover {
color: lightgrey;
text-decoration: none;
}
#logo
/*main logo*/
{
position: absolute;
left: 0px;
right: 0px;
bottom: 0;
margin-left: auto;
margin-right: auto;
z-index: -1;
line-height: 100px;
}
h1 {
font-family: "Josefin Sans";
font-size: 2.5em;
right: 3rem;
}
#media (max-width: 600px) {
.carousel-caption {
display: none;
}
}
#icon {
max-width: 150px;
}
h4 {
font-size: 1.9em;
}
img {
max-height: 100px;
}
p {
padding-bottom: 5rem;
}
p#h6 {
font-family: "Josefin Sans";
color: white;
font-size: 3.5rem;
float: left;
line-height: 150px;
padding-top: 0;
z-index: -1;
margin-left: 1rem;
}
#h7 {
font-family: "Josefin Sans";
color: white;
float: left;
font-size: 2.5rem;
line-height: 150px;
}
#h8 {
font-family: "Josefin Sans";
color: white;
float: left;
font-size: 2.5rem;
line-height: 150px;
}
h4 {
font-family: "Josefin Sans";
color: white;
font-size: 3rem;
width: 100px;
text-align: left;
position: fixed;
top: 0rem;
left: 1rem;
}
.navbar {
overflow: hidden;
background-color: #333;
font-family: Arial;
}
.navbar a {
float: left;
font-size: 16px;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
background-color: inherit;
}
.navbar a:hover,
.dropdown:hover .dropbtn {
background-color: red;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
width: 100%;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #ddd;
}
.dropdown:hover .dropdown-content {
display: block;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
</script>
<script type="text/javascript" src="js/java.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="navbar">
<div class="dropdown">
<button class="dropbtn"> <img src="http://konpakuto.com/logo.jpg">
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</div>
</div>
<h4 style="padding-bottom:-40rem;">health</h4>
by adding the following CSS you will get a working drop down
.navbar {
overflow: visible;
}
.dropdown {
float: left;
overflow: visible;
}
.dropdown:hover .dropdown-content {
display: block;
}
I am having trouble centering the following CSS dropdown menu:
.container {
overflow: hidden;
background-color: none;
font-family: 'Questrial', sans-serif;
}
.container a {
float: right;
font-size: 20px;
color: green;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.dropdown {
float: right;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 20px;
border: none;
outline: none;
color: green;
padding: 14px 16px;
background-color: inherit;
font-family: 'Questrial', sans-serif;
}
.container a:hover,
.dropdown:hover .dropbtn {
background-color: none;
color: green;
}
.dropdown-content {
display: none;
position: absolute;
background-color: none;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: green;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: none;
color: green;
}
.dropdown:hover .dropdown-content {
display: block;
}
I have tried using position: absolute, and entering values for "top" and left" however this only seems to move the text, and loses the dropdown functionality.
Any help would be appreciated.
Thanks.
Full code here:
gist.github.com/ruslan024/1a7d2ce4936a35369221a8f0e41c5dd7
Do you mean something like this? Without the full HTML formatted into a snippet (not just some 3rd party gist) I had to make some assumptions. Apart from that it was just a few CSS tweaks.
.container {
background-color: #eee;
font-family: 'Questrial', sans-serif;
text-align: center;
height: 300px;
}
.container > a {
display: inline-block;
font-size: 20px;
color: green;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.dropbtn {
display: inline-block;
font-size: 20px;
padding: 14px 16px;
background-color: inherit;
font-family: 'Questrial', sans-serif;
color: green;
}
.dropdown-content {
display: none;
position: absolute;
background-color: none;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: green;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: none;
color: green;
}
.dropbtn:hover .dropdown-content {
display: block;
}
<div class="container">
Contact Us
<div href="" class="dropbtn">Resources
<span class="dropdown-content">
Market Data Bank
Stock Quotes
Finacial Tools
</span>
</div>
<div href="" class="dropbtn">Services
<span class="dropdown-content">
Planning and Guidance
Portfolio Advisory Services
Wealth Planning
</span>
</div>
About Us
Home
</div>
I'm trying to make the white "Contact US" text remain active or white, while the user rolls over the button and then hovers down to the list of links. I feel like I'm just circling a very simple answer. You'll notice it turns from red to white and then back to red when you rollover the dropdown menu. How do I keep it white when you rollover the menu below it?
I'm still in the process of cleaning up the code and adjusting the button, but I stripped out all the unnecessary bits.
JSFiddle: https://jsfiddle.net/hvj675mo/6/
<style>body {
background-color: #000000;
}
.new-contact-us {
background-color: transparent;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
border-radius: 9px;
border: 2px solid #ce1818;
display: inline-block;
cursor: pointer;
font-family: Arial;
font-size: 14px;
font-weight: bold;
padding: 14px 14px;
text-decoration: none;
line-height: 10px;
color: #ce1818;
}
.new-contact-us:hover {
background-color: #ce1818;
font-family: Arial;
font-size: 14px;
font-weight: bold;
color: #ffffff;
}
.new-contact-us:active {
position: relative;
/*top:1px;*/
color: #ffffff;
background-color: #ce1818;
}
/**** START BOX DIV ****/
.new-contact-us-box {
position: relative;
display: block;
}
.new-contact-us-box:active {
color: #ffffff;
}
/**** START DROPDOWN ****/
.new-contact-us-box ul li {
padding-bottom: 10px;
font-size: 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #ababaa;
text-transform: none;
}
.new-contact-us-box ul li a {
color: #ce1818;
text-decoration: none;
}
.new-contact-us-box ul li a:hover {
text-decoration: underline;
}
.new-contact-us-box ul li a:active {
text-decoration: underline;
}
.container-contact {
float: left;
width: 296px;
margin 0px;
}
.new-contact-us-box ul {
padding-left: 0px;
list-style: none;
margin: 0px;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown:hover {
position: relative;
display: inline-block;
background-color: #ce1818;
color: #ffffff;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
border-radius: 9px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #ffffff;
min-width: 160px;
padding: 12px 16px;
z-index: 1;
}
.dropdown:hover .dropdown-content {
display: block;
left: auto !important;
right: 0 !important;
}
</style>
<div style="width: 700px; padding-left: 600px">
<!-----WILL REMOVE THIS DIV AFTER. HERE FOR TESTING---->
<div class="new-contact-us-box dropdown">
CONTACT US
<div class="dropdown-content">
<ul style="width: 296px; left: auto !important; right: 0 !important; padding: 20px;">
<li>
<div class="container-contact">
<ul>
<li>Hello</li>
<li><img src="####" style="margin-right: 10px;">#########</li>
<li style="margin-left: 28px; margin-top: -9px"> BlAH BLAH</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
<!-----WILL REMOVE THIS DIV AFTER. HERE FOR TESTING---->
You have hover on both .new-contact-us-box and .new-contact-us. So you can change this:
.new-contact-us:hover {
background-color: #ce1818;
font-family: Arial;
font-size: 14px;
font-weight: bold;
color: #ffffff;
}
to this:
.new-contact-us-box:hover .new-contact-us {
background-color: #ce1818;
font-family: Arial;
font-size: 14px;
font-weight: bold;
color: #ffffff;
}
See demo below:
body {
background-color: #000000;
}
.new-contact-us {
background-color: transparent;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
border-radius: 9px;
border: 2px solid #ce1818;
display: inline-block;
cursor: pointer;
font-family: Arial;
font-size: 14px;
font-weight: bold;
padding: 14px 14px;
text-decoration: none;
line-height: 10px;
color: #ce1818;
}
.new-contact-us-box:hover .new-contact-us {
background-color: #ce1818;
font-family: Arial;
font-size: 14px;
font-weight: bold;
color: #ffffff;
}
.new-contact-us:active {
position: relative;
/*top:1px;*/
color: #ffffff;
background-color: #ce1818;
}
/**** START BOX DIV ****/
.new-contact-us-box {
position: relative;
display: block;
}
.new-contact-us-box:active {
color: #ffffff;
}
/**** START DROPDOWN ****/
.new-contact-us-box ul li {
padding-bottom: 10px;
font-size: 16px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #ababaa;
text-transform: none;
}
.new-contact-us-box ul li a {
color: #ce1818;
text-decoration: none;
}
.new-contact-us-box ul li a:hover {
text-decoration: underline;
}
.new-contact-us-box ul li a:active {
text-decoration: underline;
}
.container-contact {
float: left;
width: 296px;
margin 0px;
}
.new-contact-us-box ul {
padding-left: 0px;
list-style: none;
margin: 0px;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown:hover {
position: relative;
display: inline-block;
background-color: #ce1818;
color: #ffffff;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;
border-radius: 9px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #ffffff;
min-width: 160px;
padding: 12px 16px;
z-index: 1;
}
.dropdown:hover .dropdown-content {
display: block;
left: auto !important;
right: 0 !important;
}
</style>
<div style="width: 700px; padding-left: 600px">
<!-----WILL REMOVE THIS DIV AFTER. HERE FOR TESTING--->
<div class="new-contact-us-box dropdown">
CONTACT US
<div class="dropdown-content">
<ul style="width: 296px; left: auto !important; right: 0 !important; padding: 20px;">
<li>
<div class="container-contact">
<ul>
<li>Hello</li>
<li><img src="####" style="margin-right: 10px;">#########</li>
<li style="margin-left: 28px; margin-top: -9px"> BlAH BLAH</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
<!-----WILL REMOVE THIS DIV AFTER. HERE FOR TESTING---->
Change your CSS
.new-contact-us:hover {
background-color:#ce1818;
font-family:Arial;
font-size:14px;
font-weight:bold;
color: #ffffff;
}
to this:
.dropdown:hover .new-contact-us {
background-color:#ce1818;
font-family:Arial;
font-size:14px;
font-weight:bold;
color: #ffffff;
}
I am making a microsite via Dreamweaver using the fluid layout. In it, I had my header and banner inside a table under a div like so:
<div id="divHeader">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td style="width: 30px;"></td>
<td style="vertical-align: middle; font-size: 1.3rem; font-weight: bold;">
<p><span>Move Toward </span> <span class="hdr">Zero Unplanned Downtime</span></p>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<img src="images/Mining_site_1192x181-12.png" alt=""/>
</td>
</tr>
</tbody>
</table>
</div>
In most browsers, this works well (including mobile browsers):
Unfortunately, in Firefox, it's shown this way:
When I used the built-in Inspect Elemet, this is what I see in Firefox:
For some reason, the table is displayed outside the DIV element. The table doesn't have a CSS class associated with it, and as for the DID, this is the CSS for its class divHeader:
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
Is there an issue with tables within div in Firefox? If so, what's a good workaround?
Here is my CSS code:
#charset "utf-8";
/* Simple fluid media
Note: Fluid media requires that you remove the media's height and width attributes from the HTML
http://www.alistapart.com/articles/fluid-images/
*/
img, object, embed, video {
max-width: 100%;
}
a {
text-decoration: none;
}
a: hover {
color: #F59D51;
text-decoration: none;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}
/*
Dreamweaver Fluid Grid Properties
----------------------------------
dw-num-cols-mobile: 4;
dw-num-cols-tablet: 8;
dw-num-cols-desktop: 12;
dw-gutter-percentage: 25;
Inspiration from "Responsive Web Design" by Ethan Marcotte
http://www.alistapart.com/articles/responsive-web-design
and Golden Grid System by Joni Korpi
http://goldengridsystem.com/
*/
.fluid {
clear: both;
margin-left: 0;
width: 100%;
float: left;
display: block;
}
.fluidList {
list-style:none;
list-style-image:none;
margin:0;
padding:0;
}
/* Mobile Layout: 480px and below. */
.gridContainer {
margin-left: auto;
margin-right: auto;
width: 86.45%;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
background-color: #fff;
}
.zeroMargin_mobile {
margin-left: 0;
}
.hide_mobile {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner480.png);
background-position: bottom;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 480px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 100%;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.9rem;
line-height: 1rem;
margin-left: 0px;
padding-left: 15px;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr li.q1 {
list-style-image:url(../images/icons/question_icon.jpg)
}
.ulNltr li.c1 {
list-style-image:url(../images/icons/contact_icon.jpg)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
#media only screen and (min-width: 481px) {
.gridContainer {
margin-left: auto;
margin-right: auto;
width: 90.675%; /*width: 480px;*/
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
background-color: #fff;
}
.zeroMargin_tablet {
margin-left: 0;
}
.hide_tablet {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner768.png);
background-position: bottom;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 480px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 100%;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
/* Desktop Layout: 769px to a max of 1079px. Inherits styles from: Mobile Layout and Tablet Layout. */
#media only screen and (min-width: 769px) {
.gridContainer {
width: 88.5%; /*width: 768px;*/
max-width: 768px;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
margin-left: auto;
margin-right: auto;
background-color: #fff;
}
.zeroMargin_desktop {
margin-left: 0;
}
.hide_desktop {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner768.png);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 768px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 33%;
float: left;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.cntRw {
display: table-cell;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
/* Desktop Layout: 1080p and beyond. Inherits styles from: Mobile Layout and Tablet Layout. */
#media only screen and (min-width: 1079px) {
.gridContainer {
width: 88.5%; /*width: 1192px; */
max-width: 1192px;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
margin-left: auto;
margin-right: auto;
background-color: #fff;
}
.zeroMargin_desktop {
margin-left: 0;
}
.hide_desktop {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
clear: right;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_1192x181-12.png);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 1191px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 33%;
float: left;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.cntRw {
display: table-cell;
}
div.divBack {
width: 100%;
text-align: center;
margin: 0px;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRM {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
It does seem that Firefox is having problems with the table within the div. I changed the HTML part to this:
<!-- Page header and banner -->
<div id="divHeader">
<div style="display: table-cell; vertical-align: middle;">
<p>Move Toward <span class="hdr">Zero Unplanned Downtime</span></p>
</div>
</div>
<div id="divHBanner">
<img src="images/Mining_site_1192x181-12.png" alt=""/>
</div>
<!-- End Page header and banner -->
It fixed the original error, but it opened up another. I will post a separate question for that instead.
I have tried in jsfiddle and in my web test page and everything is okay when I remove #charset"utf-8";
when I set it again, it went collided again