Autocomplete white background not working in CSS - html

I want to have a white background where the user can select a item in the autocomplete however I have my header image that keeps repeating.
Here is a image of my probleme
As you can see I highlighted in blue every suggestion. However I get the background image for each suggestion instead of having a simple white background.
Here is my html
<header>
<h1>
<a href="/">
<span class="texte-cache">Sel gras</span>
</a>
</h1>
<section class="section-recherche">
<?php
// define variables and set to empty values
$rechercheErr = "";
$recherche = "";
$rechercheValid = false;
?>
<form method="get" action="../pages/recherche.php">
<label for="recherche" class="lblRechercher">Rechercher</label>
<div class="recherche">
<input type="search" name="recherche" id="recherche" placeholder="Rechercher..." value="<?php echo $recherche; ?>" />
<span class="error"> <?php echo $rechercheErr; ?></span>
<button title="Rechercher" class="button-recherche" id="buttonRecherche" name="submit"><i class="material-icons-white">search</i></button>
</div>
<div id="div-suggestions" class="suggestions masquer"></div>
</form>
</section>
</header>
And here is my css that cause the probleme
/*Exemple when screen is large*/
#media screen and (min-width: 1300px) {
header a {
display: block;
margin-left: auto;
margin-right: auto;
height: 270px;
background-size: 100% 120%;
background-image: url(../images/logo-long.jpg);
background-repeat: no-repeat;
background-position: center top;
}
}
Here is the css for the autcomplete.
.afficher {
display:block;
}
.masquer {
display:none;
}
.suggestions {
background-color:white;
width:194px;
position:absolute;
border: 1px solid gray;
background-image: none;
}
.suggestions ul {
padding-left:0;
margin:0;
list-style-type:none;
}
.suggestions ul li:hover {
background-color:lightblue;
}
I have tried to add
background-image: none;
However it did not work. What can I do to fix this problem thank you for your help
I have added a JsFiddle here
https://jsfiddle.net/L9afb2u0/

the code is a little hard to understand, but basically, remove background image and add an img element on the html doc.
var scriptSug =
{
"divSuggestions" : null
};
function viderElement(element) {
while (element.lastChild) {
element.removeChild(element.lastChild);
}
}
/**
* Appelée lors d'un clic dans la fenêtre
*/
function gererClicFenetre(evenement) {
var clicDedans = scriptSug.divSuggestions.contains(evenement.target);
window.console.log("Clic dans la zone cliquable ? " + clicDedans);
if (!clicDedans) {
viderElement(scriptSug.divSuggestions);
scriptSug.divSuggestions.className = "suggestions masquer";
document.removeEventListener("click", gererClicFenetre);
}
}
/**
* Pour demander les suggestions au site web.
*
* On devrait procéder par AJAX pour récupérer les suggestions, mais
* elles sont "hard-codés" pour la démo.
*/
function afficherSuggestions() {
viderElement(scriptSug.divSuggestions);
scriptSug.divSuggestions.className = "suggestions afficher";
var elemListe = document.createElement("ul");
scriptSug.divSuggestions.appendChild(elemListe);
for (var i=0;i<5;i++) {
var itemListe = document.createElement("li");
// TODO : ne pas mettre de .innerHTML dans votre TP
itemListe.innerHTML =
"<a href='http://www.google.ca'>Suggestion " + i + "</a>";
elemListe.appendChild(itemListe);
}
// Ajout d'un événement sur tout le document (la fenêtre)
document.addEventListener("click", gererClicFenetre, false);
}
/**
* Appelée lors de l'initialisation de la page
*/
function initialisation() {
scriptSug.divSuggestions = document.getElementById("div-suggestions");
document.getElementById("recherche").addEventListener("input", afficherSuggestions, false);
}
window.addEventListener("load", initialisation, false);
#charset "UTF-8";
/* Créé par Junior Corenbach et MINH NGUYEN */
html,
body {
margin: 0;
}
#page{
background-color: #eFeFeF;
margin: auto;
width: 80%;
height: 100%;
font-family: Arial, Helvetica, sans-serif;
padding-bottom: 3%;
}
a{
text-decoration: none;
color: #aa0000;
}
a:hover{
text-decoration: none;
color: #DB9900;
}
p{
margin-left: 30px;
}
header{
background-color: #DFDFDF;
margin: auto;
width: auto;
}
main{
margin-left: 30px;
contain: layout;
}
footer{
margin-left: 30px;
padding-bottom: 30px;
}
/* || En tête */
h1{
margin: 0;
}
h2{
margin: 0;
text-align: center;
}
h4{
margin: 0;
font-size: 1.4rem;
text-align: center;
}
.afficher {
display:block;
}
.masquer {
display:none;
}
.suggestions {
background-color:white;
width:194px;
position:absolute;
border: 1px solid gray;
}
.suggestions ul {
padding-left:0;
margin:0;
list-style-type:none;
}
.suggestions ul li:hover {
background-color:lightblue;
}
/* || Page connection */
#connection div{
margin: 10px;
}
input[type=button], input[type=submit] {
background-color: #DB9900; /* Green */
border: #7F5900 solid 1px;
border-radius: 5px;
color: white;
padding: 5px 10px;
display: inline-block;
text-align: center;
text-decoration: none;
font-weight: bold;
font-size: 16px;
width: 50%;
}
input[type=button], input[type=submit]:hover {
background-color: #C08600;
cursor: pointer;
}
input[type=button], input[type=submit]:active {
background-color: #A57300;
}
.error{
color: red;
}
.recherche{
display: flex;
margin-bottom: 3%;
}
.gallery-link{
color: #111;
}
.gallery-link:hover{
color: #DB9900;
}
/*min ici pour tout ecran plus grand est une image*/
#media screen and (min-width: 1300px) {
header a {
display: block;
margin-left: auto;
margin-right: auto;
height: 270px;
}
}
#media screen and (max-width: 1300px) {
header a {
display: block;
margin-left: auto;
margin-right: auto;
height: 270px;
background-size: 100% 120%;
}
}
#media screen and (max-width: 1000px) {
header a {
display: block;
margin-left: auto;
margin-right: auto;
height: 270px;
}
}
#media screen and (max-width: 700px) {
header a {
display: block;
margin-left: auto;
margin-right: auto;
height: 270px;
}
}
.texte-cache {
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px) !important;
clip: rect(1px, 1px, 1px, 1px) !important;
}
/******************************************/
/*************** MENU***********************/
/******************************************/
.menu-principal {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #DB9900;
}
.menu-principal li {
float: left;
}
.menu-principal li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.menu-principal li a:hover {
background-color: #111;
}
/******************************************/
/***********ERREUR*************************/
/******************************************/
.imag-erreur{
width: 100%;
}
.header-erreur{
text-align: center;
font-size: 1000%;
color:#DB9900;
border: #111111;
}
.erreur-text-large{
font-size: 300%;
text-align: center;
margin: 0;
}
.erreur-text-petit{
font-size: 120%;
text-align: center;
color:#111;
margin: 0;
}
.icon-page-acces{
text-align: center;
}
/******************************************/
/***********GALERY*************************/
/******************************************/
#font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
}
.material-icons-yellow {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
color: #DB9900;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
}
.material-icons-yellow-large {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
color: #DB9900;
font-size: 900%;
line-height: 1;
letter-spacing: normal;
text-transform: none;
vertical-align: top;
}
.material-icons-white {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
color: white;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
}
.material-icons-white-small {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
color: white;
font-size: 16px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
}
.material-icons-red {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
color: #aa0000;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
}
div#gallery-large {
margin: 5px;
border: 1px solid #ccc;
display: inline-block;
width: 70%;
background-color: white;
text-align: center;
}
#gallery-auto{
display: inline-block;
text-align: center;
width: 95%;
}
.titre-gallery-auto-section{
min-height: 50px;
}
.gallery-hiden{
display: none;
clip: rect(1px, 1px, 1px, 1px) !important;
clip: rect(1px, 1px, 1px, 1px) !important;
}
div.gallery {
margin: 5px;
border: 1px solid #ccc;
float: left;
width: 180px;
background-color: white;
}
div.gallery:hover {
border: 1px solid #777;
}
.imageRecette {
width: 100%;
height: auto;
}
div.desc {
text-align: center;
}
div.desc p{
float: right;
margin: 0;
padding: 0px;
text-align: center;
}
.list-recettes{
display: flex;
flex-wrap: wrap;
float: left;
}
.titre-gallery{
min-height: 150px;
}
/******************************************/
/******************************************/
/******************************************/
.image-details-recette{
float: right;
margin: 5px;
width: 30%;
overflow: auto;
}
.deuxieme-section-recette{
padding-top: 2%;
clear: both;
}
input[type=text], input[type=password], input[type=email] {
width: 100%;
padding: 12px 10px;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
input[type=search] {
width: 60%;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
.section-recherche{
position: absolute;
top: 190px;
padding-left: 20px;
width: 80%;
}
input[type="checkbox"]{
padding: 0%;
cursor: pointer;
}
input[type="submit"]{
width: 100%;
padding: 12px 10px;
}
hr{
margin: 1%;
}
#buttonRecherche{
width: 50px;
border-radius: 0px;
border: none;
}
#button-commenter{
width: 120px;
display: block;
margin-top: 1%;
margin-bottom: 1%;
}
#button-gallery-precedent{
width: 120px;
margin-top: 1%;
margin-bottom: 1%;
display: none;
}
#button-gallery-suivant{
width: 120px;
margin-top: 1%;
margin-bottom: 1%;
display: none;
}
.btn-gallery{
text-align:center;
}
.image-gallery-auto{
width: 100%;
height: 100%;
}
textarea{
width: 99%;
resize: none;
}
.section-commentaire{
margin-left: 2%;
}
.pied li{
list-style-type: none;
}
.pied-couriel li{
list-style-type: none;
}
button{
background-color: #DB9900;
border: #7F5900 solid 1px;
border-radius: 5px;
color: white;
padding: 5px 10px;
display: inline-block;
text-align: center;
text-decoration: none;
font-weight: bold;
font-size: 16px;
width: 50%;
}
.lblRechercher{
display: inline;
color:white;
font-size: 100%;
}
a{
background: white;
border: 5px solid reD;
}
<html>
<body style="">
<div id="page">
<header>
<h1>
<a href="/">
<img src="https://static.makeuseof.com/wp-content/uploads/2008/05/opensource.gif" />
<span class="texte-cache">Sel gras</span>
</a>
</h1>
<section class="section-recherche">
<form method="get" action="../pages/recherche.php">
<label for="recherche" class="lblRechercher">Rechercher</label>
<div class="recherche">
<input type="search" name="recherche" id="recherche" placeholder="Rechercher..." value="" />
<span class="error"> </span>
<button title="Rechercher" class="button-recherche" id="buttonRecherche" name="submit"><i class="material-icons-white">search</i></button>
</div>
<div id="div-suggestions" class="suggestions masquer"></div>
</form>
</section>
</header>
</div>
</body>
</html>

You can add a <span class="YourClass">Suggestion 0</span> inside the a href and give a different css to the span then you can modify only the suggestions 0 etc

I figured it out I used
#media screen and (min-width: 1300px) {
header h1 a {
instead of
#media screen and (min-width: 1300px) {
header a {

You should learn a bit more for how css selectors works.
Since header a says, any a in header should have next styles (and you dropdawn is part of header and has a in it) it inherits that styles.
To be more specific you could add some class for yours a in header (a.link for example), and separate styles in that way.

Related

Website Pulls Correct Fonts Only When Clicking Certain Links, Will Otherwise Pull From System Fonts

I'm having the problem described in the post title with my portfolio website, and I'm really at a loss as to what the problem could be. The "Work" and "Contact" pages won't pull the correct fonts even if I navigate to them using my dropdown links, and individual project pages only pull the proper fonts if I navigate to one of the projects from the home page (after clicking the logo on the top left to get the fonts to load at all), and then use previous and next buttons at the end of each project. I've checked all references to files within folders, and everything seems to be in order. The site's URL is mtbailey.com, and I've attached a screenshot of what things should look like if everything works the way it's supposed. Does anyone have any idea what's going on?
https://gyazo.com/d478ce4471e5944eae44af5fcef3c281
CSS:
#font-face {
font-family: 'Spartan MB';
font-style: normal;
font-weight: 400;
src: url("../fonts/SpartanMB/SpartanMB-Regular.eot"); /* IE9 Compat Modes */
src: url("../fonts/SpartanMB/SpartanMB-Regular.eot?#iefix") format('embedded-opentype'), /* IE6-IE8 */
url("../fonts/SpartanMB/SpartanMB-Regular.woff") format('woff'), /* Modern Browsers */
url("../fonts/SpartanMB/SpartanMB-Regular.woff2") format('woff2'), /* Modern Browsers */
url("../fonts/SpartanMB/SpartanMB-Regular.ttf") format('truetype'); /* Safari, Android, iOS */
text-rendering: optimizeLegibility;
}
#font-face {
font-family: 'Spartan MB';
font-style: normal;
font-weight: 600;
src: url('../fonts/SpartanMB/SpartanMB-SemiBold.eot'); /* IE9 Compat Modes */
src: url('../fonts/SpartanMB/SpartanMB-SemiBold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/SpartanMB/SpartanMB-SemiBold.woff') format('woff'), /* Modern Browsers */
url('../fonts/SpartanMB/SpartanMB-SemiBold.woff2') format('woff2'), /* Modern Browsers */
url('../fonts/SpartanMB/SpartanMB-SemiBold.ttf') format('truetype'); /* Safari, Android, iOS */
text-rendering: optimizeLegibility;
}
#font-face {
font-family: 'Spartan MB';
font-style: normal;
font-weight: 900;
src: url('../fonts/SpartanMB/SpartanMB-ExtraBold.eot'); /* IE9 Compat Modes */
src: url('../fonts/SpartanMB/SpartanMB-ExtraBold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/SpartanMB/SpartanMB-ExtraBold.woff') format('woff'), /* Modern Browsers */
url('../fonts/SpartanMB/SpartanMB-ExtraBold.woff2') format('woff2'), /* Modern Browsers */
url('../fonts/SpartanMB/SpartanMB-ExtraBold.ttf') format('truetype'); /* Safari, Android, iOS */
text-rendering: optimizeLegibility;
}
strong {
font-weight: 600;
}
html, body {
max-width: 100%;
overflow-x: hidden;
font-kerning: normal;
-webkit-font-kerning: normal;
margin: 0;
font-family: 'Spartan MB';
}
li {
list-style: none;
display: inline;
}
a {
text-decoration: none;
color: inherit;
}
p {
text-decoration: none;
font-weight: 400;
font-size: 1em;
}
hr {
background-color: #293941;
border-style: solid;
border-width: 1.2px;
float: left
width: 100%;
}
h1 {
text-decoration: none;
font-weight: 900;
font-size: 8vw;
-webkit-margin-after: 0;
-webkit-margin-before: 0;
}
h2 {
text-decoration: none;
font-weight: 900;
font-size: 4vw;
-webkit-margin-after: 0;
-webkit-margin-before: 0;
}
h3 {
text-decoration: none;
font-weight: 900;
font-size: 1.5em;
-webkit-margin-after: 0;
-webkit-margin-before: 0;
}
input[type=text] {
border-bottom: 2px solid #293941;
padding: 3px 0px;
font-family: Spartan MB;
font-size: 1em;
width: 100%;
max-width: 600px;
margin: 5px 0px 5px 0px;
}
input[type=submit] {
padding: 10px;
font-family: Spartan MB;
background-color: #25bcbd;
font-weight: 900;
color: white;
font-size: 1.35em;
cursor: pointer;
}
textarea {
border-bottom: 2px solid #293941;
border-top: none;
border-left: none;
border-left: none;
border-right: none;
width: 100%;
max-width: 600px;
height: 200px;
font-family: Spartan MB;
font-size: 1em;
padding: 3px 0px;
margin: 5px 0px 5px 0px;
}
.teal {
color: #25bcbd;
}
.blue {
color: #2F90BB;
}
.mobileimg {
display: block;
}
.desktopimg {
display: none;
}
.footnote{
font-size: 0.6em;
margin: 0.6em 0 0 1 em;
}
#wrap {
margin-top: 80px; /*Same as Header height*/
margin-left: auto;
margin-right: auto;
max-width: 600px;
position: relative;
color: #293941;
padding: 0 1vw;
}
#header {
width: 100%;
height: 82px;
background-color: #FFFFFF;
position: fixed;
top: 0px;
left: 0px;
z-index: 2;
}
#headerwrap {
margin-left: auto;
margin-right: auto;
max-width: 600px;
position: relative;
color: #293941;
padding: 0 1vw;
height: 82px;
background-color: white;
}
.mobileheaderbar {
width: 100%;
height: 2px;
background-color: #293941;
float: left;
}
#header img {
width: 100%;
height: auto;
}
#logo {
width: 160px;
height: 100px;
float: left;
display: none;
}
#dhr {
height: 3px;
width: 100%;
border-top: 2px solid #293941;
border-bottom: 2px solid #293941;
float: left;
}
#squarelogo {
width: 45px;
height: auto;
float: left;
margin-left: 10px;
}
#nav {
display: none;
float: right;
font-weight: 900;
font-size: 23px;
padding-top: 30px;
width: 20%;
}
#nav a {
color: #293941;
display: inline;
float: left;
}
input, button, submit {
border: none;
padding: 0px;
}
.dropbtn {
border: none;
cursor: pointer;
width: 60px;
height: 80px;
background-image: url("../images/hamburger.svg");
background-size: cover;
background-color: white;
}
.dropdown {
position: relative;
display: inline-block;
float: right;
}
.dropdown-content {
display: none;
position: absolute;
background-color: white;
min-width: 160px;
overflow: auto;
right: 0px;
font-family: 'Spartan MB';
font-weight: 900;
}
.dropdown-content a {
padding: 12px 16px;
text-decoration: none;
display: block;
color: #293941;
border-bottom: 1px solid #293941;
}
.dropdown a:hover {background-color: #e5e5e5}
.show {display:block;}
#landing {
width: 100%;
position: relative;
border-bottom: 2px solid #293941;
display: block;
float: left;
}
#lndmain {
width: 100%;
clear: both;
float: left;
}
#lndside {
width: 100%;
clear: both;
float: left;
line-height: 2;
padding-bottom: 25px;
}
#lndmain h1{
font-size: 3em;
padding-top: 25px;
}
#lndmain h2{
font-size: 1em;
font-weight: 400;
padding-bottom: 25px;
}
#lndside h1 {
font-weight: 400;
font-size: 1em;
}
.projlogo {
width: 100%;
float: left;
}
.projdesc {
float: left;
padding-bottom: 3.4%;
}
.projdesc p {
margin: 0;
}
.projdesc h1 {
line-height: 1.2;
margin-top: 3%;
}
.twocolumn {
-webkit-columns: 1 0px;
-moz-columns: 1 0px;
columns: 1 0px;
float: left;
}
.thumb {
float: left;
margin: 3.4% 0px;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
.thumb h1 {
line-height: 1;
margin-top: 3%;
}
.more {
font-size: 5vw;
font-weight: 900;
}
.prevnext {
font-size: 5vw;
font-weight: 900;
display: inline;
}
.fade:hover {
opacity: 0.5;
}
.arrow {
width: 1.75vw;
height: auto;
}
#portfoliowrap {
width: 100%;
-webkit-columns: 2 550px;
-moz-columns: 2 550px;
columns: 2 550px;
-webkit-column-gap: 1.5em;
-moz-column-gap: 1.5em;
column-gap: 1.5em;
}
#wrap img {
max-width: 100%;
height: auto;
}
.portfolioimg {
width: 100%;
max-width: 600px;
margin-top: .75vw;
margin-bottom: .75vw;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
display: inline-block;
position: relative;
}
.overlay {
position: absolute;
height: 100%;
width: 100%;
display: none;
background-image: url(../images/trans.png);
}
.overlaytext {
position: absolute;
bottom: 0;
padding: 15px;
color: white;
}
.footerbox {
float: left;
display: inline;
margin: 20px 0px 30px 0px;
}
.h_iframe {
position:relative;
clear:both;
}
.h_iframe .ratio {
display:block;
width:100%;
height:auto;
}
.h_iframe iframe {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}
#contactform {
padding-top: 3.4%;
}
.h_iframe {
position:relative;
clear:both;
}
.h_iframe .ratio {
display:block;
width:100%;
height:auto;
}
.h_iframe iframe {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
}
#media screen and (min-width: 1200px) {
#wrap {
max-width: 1200px;
padding: 0 0;
}
#header {
height: 100 px;
}
#headerwrap {
max-width: 1200px;
padding: 0 0;
height: 100px;
border-bottom: 2px solid #293941;
}
.mobileimg {
display: none;
}
.desktopimg {
display: block;
}
.mobileheaderbar {
display: block;
}
p {
font-size: 19px;
}
h1 {
font-size: 3.25em;
}
h2 {
font-size: 2.5em;
}
h3 {
font-size: 1.75em;
}
.footnote {
font-size: 14px;
}
#nav {
display: inline-block;
}
#logo {
display: inline;
}
#logo img {
height: 100px;
}
#squarelogo {
display: none;
}
#landing {
margin-top: 20px;
}
#lndmain {
width: 74.9%;
/*Not an even 75% to account for lndmain border-right*/
border-right: 2px solid #293941;
}
#lndside {
width: 20%;
/*Not an even 25% to account for lndmain border-right*/
clear: none;
box-sizing: border-box;
margin: 0 0 152px 4.9%;
position: absolute;
right: 0;
bottom: 0;
}
#lndmain h1{
font-size: 8em;
padding-top: 100px;
}
#lndmain h2{
font-size: 3em;
padding-bottom: 100px;
}
#lndside h1{
font-size: 1.3em;
}
.projlogo {
width: 25%;
border-right: 2px solid #293941;
padding: 2.5% 5% 2.5% 0px;
}
.projdesc {
width: 64%;
padding: 4.75% 0px 0px 5%;
/*Not an even 65% to account for projlogo border-right*/
}
.dropbtn {
display: none;
}
#nav a:nth-of-type(even){
float: right;
text-align: right;
}
/*This floats "Contact" to the right on desktop by floating only even numbered nav links to the right*/
.twocolumn {
-webkit-columns: 2 590px;
-moz-columns: 2 590px;
columns: 2 590px;
-webkit-column-gap: 20px;
-moz-column-gap: 20px;
column-gap: 20px;
}
.thumb {
height: 625px;
position: relative;
}
.more {
font-size: 2em;
position: absolute;
bottom: 0px;
}
.prevnext {
font-size: 2em;
}
.arrow {
width: 11px;
}
}
htaccess
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html Header add Access-Control-Allow-Origin "*"
Sorry for the extended comments section, I try not to reach out on this site to avoid being a bother, and I see that I've had the opposite effect in flooding the comments.
It seems like things have sorted themselves out whether using www or not, but it'll probably still be a good idea to update my htaccess to force non-www.

I want a text box appear when my client is using only IE 11 to open my website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want a text box to appear when a user or client is opening my website using IE 11, while I'm trying to resolve a problem in my code.
Or if you maybe have an idea to resolve my problem please write to my inbox here on stackoverflow. (IE 11 is killing me...)
as you can see the problem is when you are opening It on IE it makes the images full size, and the console in ie is not helping that much for me.
Code
Html
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title>News | Designplace</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="CSS/Navigation.css" rel="stylesheet" type="text/css">
<link href="CSS/Content.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="NavScript.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<div class="sidenav" id="mySidenav">
<!--NAv-->
</div>
<div class="sidenav_small" id="mySidenav_small">
</div>
<div class="sidenav_icon" id="mySidenav_icon">
☰
</div>
<div class="latest">
<h2 class="latest_news">Latest News</h2>
<h4 class="more">More...</h4>
<div class="table">
<div class="tr">
<div class="td">
<a class="img_link" href="/art/news/00004/Review-af-macos-Mojave-public-beta.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="macOS">
<div class="inner">
<h3>Review af macOS Mojave beta: God men ikke perfekt.
</h3>
</div>
</a>
</div>
<div class="th"></div>
<div class="td">
<a class="img_link" href="/art/news/00002/206-400-danskere-har-downloadet-ny-nemid-app-i-foerste-doegn-efter-lancering.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="NemID">
<div class="inner">
<h3>206.400 danskere har downloadet ny NemID-app i første døgn efter lancering.
</h3>
</div>
</a>
</div>
<div class="th"></div>
<div class="td">
<a class="img_link" href="/art/news/00001/hands-on-nokias-spritnye-foraarskollektion-viser-at-billige-smartphones-ikke-behoever-at-vaere-tarvelige.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="Nokia telefon">
<div class="inner">
<h3>Hands-on: Nokias spritnye forårskollektion viser, at billige smartphones ikke behøver at være tarvelige.
</h3>
</div>
</a>
</div>
</div>
</div>
</body>
</head>
</html>
CSS
#charset "UTF-8";
html, body {
height: 100%;
}
.object {
height: 100%;
width: 100%;
}
.table {
display: table;
width: 100%;
}
.tr {
display: table-row;
}
.td {
display: table-cell;
/*border: 1px solid #ccc;*/
padding: 2px;
width: 31.1%
}
#media screen and (max-width: 400px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 40px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 14px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
text-decoration: none;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 401px) and (max-width:600px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
th {
width: 423px;
height: 273px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 50px;
text-align: center;
margin: -10px;
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 18px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 601px) and (max-width: 720px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
th {
width: 423px;
height: 273px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 70px;
text-align: center;
margin: -10px;
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 24px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:720px) and
(max-width:750px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:29%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 750px) and (max-width: 1280px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.th {
width: 20px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.teaser {
font-size:70%;
min-height: 50%;
padding: 5px 0px 0px 0px
}
.infoline {
font-size: 70%;
color:white;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 1281px) and (max-width: 1440px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:29%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 1441px) and (max-width:1920px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
margin-top: 5px;
font-size: 13px;
min-height: 25%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:22%;
margin-right: 20px;
}
.infoline {
font-size: 12px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:1921px) and (max-width:2160px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:19.5%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:2160px) and (max-width:3840px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:11%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
EDIT:
I changed the code from .Img to .Img_link > Img and that worked but if someone has an idea to get var isIE11 = !!window.MSInputMethodContext && !!document.documentMode; working with an whole javascript, I will be happy, im not that good with javascript yet.
i've tried:
function IncompatibleBrowser() {
var x = document.getElementById("simpleModal")
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if (true) {
x.className += " Incompatible";
} else {
x.className = "Compatible"
}
}
EDIT 2:
Okay the code that Zani gave worked kinda. the console in our browsers only detects the code in IE11, just a I wanted. but the code gave an error:
Script 5007: Unable to get property 'style' of undefined or null reference
This is the code that Zani gave.
<script type="text/javascript">
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if(isIE11)
document.getElementById("IDOfYourElement").style.display="block";
</script>
There is no problem with IE. The problem is in your code.
Please find all .img {width:100%} in your enormous CSS and replace them with
img {width:100%} (without a dot).
You can target IE11 with browser sniffing. This comes with its own downsides, as you might know.
In my experience IE11 is not that bad (compared to IE8 or Safari). So there is a good chance that your issue or set of issues can be handled.
Please ask a more specific question.
<script type="text/javascript">
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if(isIE11)
document.getElementById("IDOfYourElement").style.display="block";
</script>
Please first search before ask question.
Internet Explorer 11 detection

HTML5/CSS3 - Can't change font-size on #media

The code is kind big but considering I don't know where the problem is I'll paste all my HTML5 file and CSS3 stylesheet in here.
I've started work with web designing now and I'm just reworking my first website in order to make it be responsive.
I know that when rules are the same, it makes count the last one and it's not always a good pratice to keep it repeating itself but in my case the rules isn't exactly the same, I'm using different classes ("caixa" means "box", and I made different ones for different ocasions, at least it's I believe I'm doing. In this case, I can't change the font-size when coding the #media(max-width: 480px)) in each situation and no matter how I try it...I mean, I even tried to make new classes just to change it but it JUST DON'T RECOGNIZE. I'm getting nuts here guys. What I'm doing wrong?
"Sorry" for portugues classes and yes I mix it with english words, habits, any doubt just ask... oh, and "sorry" for bad english of course, I'M FREAKING NUTS HERE DAMN WANNA EXPLODE EVERYTHING WITH A F*CKING BAZOOKA !!!
My HTML5 file (the part that I wanna mess with):
<!-- REVISTA START -->
<section class="posts-section">
<section class="container-small">
<!-- maria trindade -->
<section id="maria-trindade" class="caixa-destaque">
<div class="title">
<a href="revista\artistas\maria-trindade.html">
<h2>VER DE PERTO</h2>
</a>
</div>
<div class="img">
<a href="revista\artistas\maria-trindade.html">
<img src="_img/posts/maria-trindade/ver-de-perto/3.png" alt="">
</a>
</div>
<div class="author">
<a href="revista\artistas\maria-trindade.html">
<h4>Maria Trindade</h4>
</a>
</div>
<div class="continue-btn">
<a href="revista\artistas\maria-trindade.html">
<h5>CONTINUAR A LEITURA</h5>
</a>
</div>
</section>
<!-- bru pereira -->
<section id="bru-pereira" class="caixa-destaque">
<div class="title title-small">
<a href="revista\artistas\bru-pereira.html">
<h2>Pacto</h2>
</a>
</div>
<div class="text">
<a href="revista\artistas\bru-pereira.html">
<p>Muito me anima compor parte de um novo corpo, fazer corpo é uma arte, uma artesania que aprecio cada vez mais. Me instigo a pensar a partir desse lugar de entrelaçamento entre o somático e o coletivo, a partir desse corpo que fazemos sempre
juntas e juntos. (...)</p>
</a>
</div>
<div class="author">
<a href="revista\artistas\bru-pereira.html">
<h4>Bru Pereira</h4>
</a>
</div>
<div class="continue-btn">
<a href="revista\artistas\bru-pereira.html">
<h5>CONTINUAR A LEITURA</h5>
</a>
</div>
</section>
<!-- carol do vale -->
<section id="carol-do-vale" class="caixa-destaque">
<div class="title">
<a href="revista\artistas\carol-do-vale.html">
<h2>O meu corpo é um templo: Eu respeito, eu curo, eu liberto</h2>
</a>
</div>
<div class="text">
<a href="revista\artistas\carol-do-vale.html">
<p>É pessoalmente difícil escrever sobre algo tão íntimo como mera observadora. A trajetória dos corpos não-brancos diante de um sistema que esmaga a autoestima deve ser sempre narrada em primeira pessoa. Precisamos nos tornar protagonistas e
não meros coadjuvantes em nossa própria história. (...)</p>
</a>
</div>
<div class="author">
<a href="revista\artistas\carol-do-vale.html">
<h4>Carol do Vale</h4>
</a>
</div>
<div class="continue-btn">
<a href="revista\artistas\carol-do-vale.html">
<h5>CONTINUAR A LEITURA</h5>
</a>
</div>
</section>
<!-- bruna gomes -->
<section id="bruna-gomes" class="caixa-destaque proxima-fila">
<div class="title">
<h2>CALO NA MÃO</h2>
</div>
<div class="img">
<a href="revista\artistas\bruna-gomes.html">
<img src="_img/posts/bruna-gomes-afonso/IMAGENS/2.png" alt="">
</a>
</div>
<div class="text text-fix">
<a href="revista\artistas\bruna-gomes.html">
<p>O Projeto Calo na Mão traz como característica a brincadeira, no sentido de brincar a cultura popular, de brincar o maracatu, onde Corpo e Espaço estabelecem relações baseadas na vivência. (...)</p>
</a>
</div>
<div class="author">
<a href="revista\artistas\bruna-gomes.html">
<h4>Bruna Gomes Afonso</h4>
</a>
</div>
<div class="continue-btn">
<h5>CONTINUAR A LEITURA</h5>
</div>
</section>
<!-- bruna diniz -->
<section id="bruna-diniz" class="caixa proxima-fila">
<div class="text text-big poesia">
<a href="revista\artistas\bruna-diniz.html">
<p>corpo estrangeiro sem imagem<br>
um espelho vazio que não sou capaz de ver e já não sei se um dia verei<br>
se quer serei capaz de pintar algum rosto que imagino ser o meu<br>
qualquer imagem que nos dissesse sobre aquele fio de navalha<br>
pelo qual percorri e ainda percorrerei<br>
imagine só o que serão nossos filhos<br>
nossas filhas<br>
que ainda não são frutos<br>
e se forem algum, de quais flores irão nascer? (...)</p>
</a>
</div>
<div class="author">
<a href="revista\artistas\bruna-diniz.html">
<h4>Bruna Diniz</h4>
</a>
</div>
<div class="continue-btn">
<a href="revista\artistas\bruna-diniz.html">
<h5>CONTINUAR A LEITURA</h5>
</a>
</div>
</section>
<!-- bruno caldeira -->
<section id="bruno-caldeira" class="caixa proxima-fila">
<div class="title">
<a href="revista\artistas\bruno-caldeira.html">
<h2>Sobre um treze de maio garganta-abaixo</h2>
</a>
</div>
<div class="text text-big poesia">
<a href="revista\artistas\bruno-caldeira.html">
<p>Segurar o silêncio do peso do mundo<br> Do sujo-modo de um comportamento sódico<br> Grilhões
<br> y correntes<br> Ecoam
<br> Na mente<br> Da Gente preta que sente<br> Manicômios
<br> Escolas
<br> Embranquecimentos
<br> Traumas (...)
<br><p>
</a>
</div>
<div class="author">
<a href="revista\artistas\bruno-caldeira.html">
<h4>Bruno Caldeira</h4>
</a>
</div>
<div class="continue-btn">
<a href="revista\artistas\bruno-caldeira.html">
<h5>CONTINUAR A LEITURA</h5>
</a>
</div>
</section>
<section class="btn-section">
<div class="btn">
<a href="revista\index.html">
<h2>Revista</h2>
</a>
</div>
<div id="btn-m" class="btn">
<a href="edicoes\index.html">
<h2>#1</h2>
</a>
</div>
</section>
My CSS3 stylesheet:
/* -- GENERAL -- */
/*
* colors:
* #4C1919 - Bordô* - rgba(178, 35, 35, .5) - rgba(233, 26, 26, 1)
* #BAA87C - Bege* - lighter => #CFC7B4
*
*
* fonts:
* 'Source Sans Pro', sans-serif;
* 'Oswald', sans-serif;
*/
/* global */
body {
font: 15px/1.5 'Oswald', 'Source Sans Pro', sans-serif;
margin: 0;
padding: 0;
width: 100%;
height: auto;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
body a:hover {
text-decoration: none;
color: lightgray;
}
section.logo-big img {
width: 80%;
}
.container {
width: 90%;
}
.logo {
width: 60%;
}
.social {
float: right;
margin-top: -85px;
margin-right: 100px;
width: 150px;
height: 60px;
}
.social-btns {
margin-top: 10px;
margin-left: 40px;
}
.social-btns img:hover {
color: #000000;
opacity: 0.7;
}
img.facebook-logo {
margin-top: -5px;
width: 30px;
height: 30px;
}
img.instagram-logo {
margin-top: 5px;
width: 60px;
height: 45px;
}
.section-title {
text-align: center;
margin-top: 100px;
color: #ffffff;
font-size: 120px;
}
/* landing-page */
.landing-page {
width: 100%;
height: 640px;
}
.menu {
width: 100%;
height: 90px;
background: #212121;
border-bottom: 5px solid black;
}
.menu ul {
margin: 35px auto;
}
.menu ul li {
display: inline;
}
.menu ul li a {
font-size: 20px;
color: #ffffff;
padding: 10px;
text-transform: uppercase;
}
.menu ul li a:hover {
color: Dimgray;
}
.landing-page .logo {
width: 50%;
float: right;
margin-right: 200px;
text-align: center;
}
.landing-page .logo img {
width: 80%;
margin-left: -270px;
}
.links-lp {
float: left;
width: 17%;
margin-top: 100px;
margin-left: 100px;
}
.links-lp li a {
color: #000000;
}
.links-lp li a:hover {
font-weight: bold;
background: rgba(233, 26, 26, 1);
}
.coluna01 {
float: right;
clear: right;
margin-top: -200px;
margin-right: 50px;
width: 16%;
height: 80px;
background: #212121;
border: 2px solid black;
box-shadow: 2px 2px 2px Dimgray;
}
.coluna01 h1 {
font-size: 30px;
text-align: center;
margin-top: 20px;
color: #ffffff;
text-shadow: 1.5px 1.5px Dimgray;
}
.coluna01 h1:hover {
color: lightgray;
}
/* cita */
section.cita {
width: 100%;
height: 420px;
background: #ffffff;
border-top: 20px solid #212121;
border-bottom: 20px solid #212121;
}
.coluna02 {
float: left;
width: 30%;
height: 400px;
background: #212121;
}
.coluna02 .section-title {
margin-top: 40px;
margin-left: 40px;
background: rgba(0,0,0, 1);
}
.coluna02 h2.section-title {
width: 80%;
height: 300px;
padding-top: 60px;
text-align: center;
text-shadow: 3px 5px Dimgray;
}
section.cita img {
width: 6%;
}
#aspas01 {
float: left;
margin-top: 130px;
margin-left: 50px;
}
#aspas02 {
float: right;
margin-top: 140px;
margin-right: 30px;
transform: rotate(180deg);
}
.quote-text {
float: left;
margin-top: 115px;
margin-left: 10px;
font-family: 'Crimson Text', serif;
}
.quote-text a {
color: #000000;
font-size: 70px;
font-style: italic;
text-shadow: 0.5px 0.5px black;
}
.quote-text a:hover {
color: Dimgray;
}
.quote-author h4 {
font-size: 40px;
font-style: normal;
text-align: center;
color: rgba(233, 26, 26, 1);
font-family: 'Oswald', serif;
text-shadow: 0.5px 0.5px rgba(233, 26, 26, 1);
}
.quote-author h4:hover {
color: firebrick;
}
/* posts landing page */
section.posts-section {
width: 100%;
height: 1700px;
}
.caixa-destaque {
float: left;
width: 45%;
height: 400px;
margin: 50px 0 20px 140px;
}
.caixa-destaque .title {
width: 80%;
}
.caixa-destaque .title h2 {
font-size: 100px;
color: rgba(233, 26, 26, 1);
text-shadow: 4px 4px black;
}
.caixa-destaque .img {
width: 100%;
}
.caixa-destaque .img img {
width: 80%;
margin-top: 10px;
box-shadow: 4px 4px 4px black;
}
.caixa-destaque .text {
width: 80%;
}
.caixa-destaque .text p {
color: #000000;
font-size: 20px;
text-align: justify;
}
.caixa-destaque .author {
float: right;
text-align: center;
margin-top: 10px;
margin-right: 120px;
width: 220px;
height: 60px;
padding: 10px;
background: #000000;
box-shadow: 2px 2px 2px dimgray;
}
.caixa-destaque .author h4 {
font-size: 30px;
color: #ffffff;
text-shadow: 1px 1px black;
}
.proxima-fila {
margin-top: 200px;
}
.poesia p {
text-align: left;
}
.text-big a p {
font-size: 20.6px;
}
.text-small a p {
font-size: 18px;
}
.caixa {
float: left;
width: 30%;
height: 200px;
margin: 50px 0 20px 140px;
}
.caixa .title h2 {
color: rgba(233, 26, 26, 1);
}
.caixa .img {
width: 80%;
}
.caixa .img img {
width: 100%;
}
.caixa .text p {
color: #000000;
}
.caixa .author {
float: right;
width: 220px;
height: 60px;
margin-top: 10px;
border: 1px solid black;
box-shadow: 2px 2px 2px dimgray;
background: #000000;
}
.caixa .author a,
.caixa .author h4 {
font-size: 25px;
margin-top: 10px;
text-align: center;
color: #ffffff;
text-shadow: 0.5px 0.5px black;
}
.caixa .author a:hover,
.caixa .author h4:hover,
.caixa-destaque .author a:hover,
.caixa-destaque .author h4:hover {
color: lightgray;
}
.caixa .continue-btn,
.caixa-destaque .continue-btn {
float: left;
width: 220px;
height: 60px;
margin-top: 10px;
border: 1px solid black;
box-shadow: 2px 2px 2px dimgray;
background: rgba(233, 26, 26, 1);
}
.caixa .continue-btn a,
.caixa-destaque .continue-btn a {
float: left;
margin-top: 15px;
margin-left: 30px;
text-align: center;
font-size: 20px;
color: #ffffff;
text-shadow: 1.5px 1.5px black;
}
section.btn-section {
float: left;
width: 300px;
height: 400px;
margin-left: 230px;
margin-top: 10px;
}
.btn {
width: 300px;
height: 70px;
background: rgba(233, 26, 26, 1);
box-shadow: 3px 3px 3px Dimgray;
border-radius: 0;
border: 2px solid black;
}
#btn-m {
margin-top: 110px;
}
.btn a h2 {
color: #ffffff;
font-size: 40px;
text-shadow: 1.5px 1.5px black;
}
.btn a:hover,
.btn h2:hover {
color: lightgray
}
section#maria-trindade.caixa-destaque .title h2 {
font-size: 90px;
}
section#bru-pereira.caixa-destaque {
float: right;
margin-top: -420px;
margin-right: 40px;
}
section#bru-pereira.caixa-destaque .title h2 {
text-align: center;
font-size: 100px;
}
#carol-do-vale.caixa-destaque {
float: right;
margin-top: -120px;
margin-right: 40px;
}
#carol-do-vale .title {
margin-top: 50px;
margin-bottom: 10px;
}
#carol-do-vale .title h2 {
font-size: 30px;
text-shadow: 1px 1px black;
}
#bruna-gomes.caixa-destaque {
margin-top: -170px;
}
#bruna-gomes.caixa-destaque .title h2 {
font-size: 90px;
}
#bruna-gomes.caixa-destaque .text {
margin-top: 10px;
}
#bruna-gomes.caixa-destaque .author h4 {
font-size: 25px;
}
#bruna-diniz.caixa {
width: 47%;
margin: -55px 0px 0px -50px;
}
#bruna-diniz.caixa .author {
margin-right: 140px;
}
#bruno-caldeira.caixa {
width: 47%;
margin: 160px 0px 0px -50px;
}
#bruno-caldeira.caixa .title h2 {
font-size: 30px;
}
#bruno-caldeira.caixa .text {
margin-top: 10px;
}
#bruno-caldeira.caixa .author {
margin-right: 140px;
}
/* eventos */
section.events-section {
width: 100%;
height: 500px;
background: #212121;
}
.agenda-text {
width: 22%;
float: left;
text-align: justify;
margin-top: 50px;
margin-left: 80px;
height: 400px;
}
.agenda-text h3 {
text-align: center;
font-size: 20px;
margin-bottom: 10px;
text-shadow: 1px 1px black;
}
.evento01,
.evento02 {
float: left;
}
.evento02 {
margin-top: 50px;
}
#eventos-text a h3,
#eventos-text a p {
text-shadow: 1px 1px black;
color: #ffffff;
}
#eventos-text a h3:hover,
#eventos-text a p:hover {
color: Dimgray;
}
#eventos {
float: left;
margin-top: 20px;
margin-left: 70px;
}
#eventos h1 {
text-shadow: 2px 2px black;
}
.calendario {
float: left;
margin-top: 200px;
margin-left: -395px;
}
.newsletter-section {
margin-top: 20px;
margin-right: 50px;
width: 28%;
float: right;
height: 430px;
background: #ffffff;
}
.newsletter-title {
float: left;
margin-top: 0px;
margin-left: 55px;
}
.newsletter-section .logo img {
width: 100%;
margin-left: 80px;
}
.newsletter-title h3 {
margin-left: -10px;
font-size: 60px;
text-shadow: 2px 2px rgba(233, 26, 26, 1);
}
#mc_embed_signup {
float: left;
margin: 20px 0 10px 60px;
}
#mc_embed_signup input[type=email] {
width: 87%;
height: 40px;
margin: 0 auto;
}
#mc_embed_signup input[type=submit] {
width: 30%;
height: 40px;
margin-left: 90px;
font-size: 18px;
}
.nav-bar-end {
width: 100%;
height: 200px;
background: #212121;
}
.nav-end ul {
float: left;
margin: 80px 0 0 300px;
}
.nav-end ul li{
display: inline;
margin-left: 20px;
}
.nav-end ul li a {
text-transform: uppercase;
font-size: 28px;
color: #ffffff;
text-shadow: 1.5px 1.5px black;
}
.nav-end ul li a:hover {
font-weight: normal;
color: lightgray;
}
.footer-section {
width: 100%;
height: 100px;
background: #212121;
}
.footer-text {
width: 50%;
margin: 0 auto;
text-align: center;
}
.footer-text h6 {
color: #ffffff;
text-shadow: 1px 1px black;
}
.footer-text a {
color: rgba(233, 26, 26, 1);
}
.footer-text a:hover {
color: firebrick;
}
/* MAIN CSS END */
#media (max-width: 480px) {
section.cita,
.calendario {
width: 0;
height: 0;
margin: 0;
padding: 0;
border: none;
display: none;
}
.coluna02 h2,
.quote-text h3,
.quote-author h4 {
font-size: 0;
}
.landing-page,
.landing-page .menu,
.landing-page .links-lp,
.landing-page .coluna01,
.landing-page .btn-section,
.cita,
.cita .coluna02,
.cita .quote-text,
.cita .quote-author,
.posts-section,
#maria-trindade,
#bru-pereira,
#carol-do-vale,
#bruna-gomes,
#bruna-diniz,
#bruno-caldeira,
.posts-section .caixa-destaque,
.posts-section .caixa,
.posts-section .btn-section,
.events-section,
.events-section .agenda,
.events-section #eventos,
.events-section .calendario,
.newsletter-section,
.nav-bar-end,
.nav-bar-end nav,
.nav-bar-end nav ul,
.footer-section {
float: none;
margin: 0;
padding: 0;
}
.clear-fix {
clear: both;
}
body {
margin: 0;
padding: 0;
width: 100%;
}
.container-small {
width: 80%;
text-align: center;
margin: 0;
padding: 0;
}
.section-title {
font-size: 30px;
}
/* global */
/* landing-page */
.landing-page {
width: 100%;
height: auto;
margin: 0;
padding: 0;
}
.landing-page .menu {
display: block;
width: 100%;
height: 200px;
margin-bottom: 10px;
}
.landing-page .menu nav {
padding-top: -20px;
width: 40%;
height: 100%;
}
.landing-page .menu ul {
margin-top: 25px;
margin-left: 20px;
}
.landing-page .menu li {
float: left;
}
.landing-page .menu a {
font-size: 16px;
}
.landing-page .social {
width: 70px;
height: 150px;
margin-top: -180px;
margin-right: 20px;
}
.landing-page .social-btns {
margin: 0;
padding: 0;
}
.landing-page .facebook-logo {
margin-top: 20px;
margin-left: 20px;
}
.landing-page .instagram-logo {
margin-top: 10px;
margin-left: 5px;
}
.landing-page .logo {
margin: 0 auto;
padding: 0;
width: 80%;
}
.landing-page .logo img {
width: 100%;
margin-top: -20px;
margin-left: -40px;
}
.landing-page .links-lp {
margin-top: 40px;
width: 100%;
}
.landing-page .links-lp ul {
text-align: center;
}
.landing-page .coluna01 {
margin-top: 20px;
width: 100%;
display: block;
}
/* revista posts */
section.posts-section {
width: 100%;
height: 2000px;
}
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
ol,ul { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size:101.1%; font-weight:normal; }
q:before,q:after { content:''; }
abbr,acronym { border:0; }
At the end of the file you have a lot of ‘reset’ classes. CSS files are read top to bottom to later rules replace those above.
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
ol,ul { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size:101.1%; font-weight:normal; }
q:before,q:after { content:''; }
abbr,acronym { border:0; }
This line here will be resetting your media query as it occurs after it in the code:
h1,h2,h3,h4,h5,h6 { font-size:101.1%; font-weight:normal; }
I would also recommend checking out something like normalize.css: http://nicolasgallagher.com/about-normalize-css/
You can include this at the start of your file.
EDIT:
Looking more closely not all the text has smaller sizes in the break point, for example you could add:
#media (max-width: 480px) {
section#maria-trindade.caixa-destaque .title h2 {
font-size: 30px;
}
}
You can also add as many media blocks as you like so you might find it easier to add each one after the rule it affects. This can help you when you’re learning but does increase the length of your code.
.someclass {
font-size: 10pt;
}
#media (max-width: 480px) {
.someclass {
font-size: 8pt;
}
}
.someclass2 {
color: red;
font-size: 20pt;
}
#media (max-width: 480px) {
.someclass2 {
font-size: 15pt;
}
}
On a side note your selectors are very complex which could be adding to your problems. Here’s some tips:
section#maria-trindade.caixa-destaque .title h2 {
font-size: 30px;
}
In the above rule you don’t need the section or class #maria-trindade .title h2 should be every you require and simplifies the specificity, see: https://stuffandnonsense.co.uk/archives/css_specificity_wars.html
I would also recommend looking at using something like BEM as it keeps your classes simpler: http://getbem.com/
And also some utility classes, for example, all your red titles have the same visual styling but each have a long and complex selector.
<h2 class="t-1">My title</h2>
/* style for primary headers */
.t-1 {
font-size: 100px;
color: rgba(233, 26, 26, 1);
text-shadow: 4px 4px black;
}
You can the reuse this simple style and if the structure of your HTML changes you do not need to edit the CSS.
I hope this helps! :)

How do I get my menu blocks to appear over banner again?

So initially the top half of my black menu blocks appeared over the top of the banner, but now the top half of them are cut off underneath of the banner like this:
Here is my styles.css file:
/* Base */
* {
margin: 0;
padding: 0;
}
body {
/*background-color: #F5F4F1;*/
background-image: url('./img/bg.jpg');
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
line-height: 20px;
color: #353535;
-webkit-font-smoothing: antialiased;
text-rendering: optimizelegibility;
}
#banner {
position: relative;
}
#banner__text-content {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
width: 100%;
text-align: center;
}
#banner__title {
font-size: 5.8rem;
text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
}
h1,h2,h3,h4,h5,h6 {
margin: 30px 0;
/*font-weight: 200;*/
color: #8ca757;
}
h1 {
font-size: 35px;
}
h1 small {
font-size: 25px;
color: #666;
}
h2 + p {
margin-top: -20px;
}
h3 + p {
margin-top: -20px;
}
h2,h3,h4 {
font-size: 30px;
}
h4.error {
color: #faa722;
}
h5,h6 {
font-size: 20px;
}
p {
margin: 0 0 20px;
}
a:link, a:visited {
color: #8ca757;
}
a:hover {
color: #7a9347;
}
ul, ol {
margin: 0 0 10px 18px;
}
ul li, ol li {
margin: 0 0 15px;
}
hr {
border: none;
height: 18px;
width: 114px;
background-image: url('./img/hr.png') center center no-repeat;
margin: 20px auto;
}
small {
font-size: 12px;
}
blockquote {
background: white;
padding: 10px;
margin: 0 0 15px;
border-left: solid 4px #d1cbb8;
font-style: italic;
}
blockquote p {
margin: 5px 0 10px;
}
blockquote code {
font-style: normal;
}
code {
color: #006699;
font-weight: bold;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
}
sup {
font-size: 0.6em;
}
/* Layout */
.wrapper {
position: relative;
width: 620px;
margin: 40px auto;
padding: 40px;
background: white;
text-align: center;
}
.wrapper:before, .wrapper:after {
content: "";
position: absolute;
top: 5px;
left: -5px;
width: 100%;
height: 100%;
background: #97917e;
z-index: -1;
}
.wrapper:before {
top: 10px;
left: -10px;
background: #514933;
}
#logo {
width: 240px;
margin: 0 auto;
display: block;
}
.sandbox {
padding: 20px;
background: #f8f5f1;
text-align: left;
}
aside {
background: white;
border: dashed 2px #97917e;
padding: 10px 20px;
margin: 40px;
}
aside h3 {
font-size: 24px;
margin-top: 10px;
}
aside h6 {
margin: 15px 0 5px;
}
table {
width: 100%;
font-size: 13px;
background: white;
margin: 0 0 20px;
}
table td {
border-bottom: solid 1px #d1cbb8;
padding: 4px;
}
table th {
background: #8ca757;
color: white;
padding: 4px;
font-weight: normal;
font-size: 15px;
}
/* Global */
input {
-webkit-font-smoothing: antialiased;
text-rendering: optimizelegibility;
}
autton, input.button {
display: inline-block;
background: #ccc;
outline: solid 2px #ccc;
border: solid 2px white;
color: white;
padding: 10px 15px;
margin: 20px 0;
text-decoration: none;
font-family: inherit;
font-size: inherit;
font-weight: bold;
cursor: pointer;
}
.button:hover, input.button:hover {
background: #bbb;
outline-color: #bbb;
}
.button.prev {
float: left;
background: #514933;
outline-color: #514933;
}
.button.prev:hover {
background: #494331;
outline-color: #494331;
}
.button.next, input.button.next {
background: #8ca757;
outline: solid 2px #8ca757;
float: right;
}
.button.next:hover, input.button.next:hover {
background: #7c9745;
}
input.button.next {
display: block;
float: none;
width: 100%;
}
.block {
display: block;
}
.cf:before,
.cf:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.cf:after {
clear: both;
}
/**
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.cf {
*zoom: 1;
}
.copyright-info h4, .copyright-info h5 {
margin: 0;
line-height: 18px;
font-size: 14px;
text-align: center;
}
.copyright-info h4 {
font-weight: bold;
}
.copyright-info {
margin: 20px 0 40px;
}
/* Final example website */
#final-example .wrapper {
width: 800px;
padding: 0;
}
#final-example .content {
padding: 20px 50px 50px;
text-align: left;
}
#final-example #nav {
margin: -27px 0 0;
}
#final-example #nav ul {
display: inline-block;
list-style: none;
text-align: left;
}
#final-example #nav ul li {
display: inline-block;
text-align: center;
margin: 0 10px;
}
#final-example #nav ul li a {
display: block;
background: #353535;
outline: solid 2px #353535;
border: solid 2px white;
color: white;
padding: 10px 15px;
text-decoration: none;
}
#final-example #nav ul li a:hover {
background: #8ca757;
outline: solid 2px #8ca757;
}
#final-example #philosophy {
text-align: center;
font-size: 18px;
line-height: 22px;
}
#final-example #footer {
font-size: 12px;
line-height: 15px;
margin: 60px 0 0 0;
}
#final-example #footer strong {
display: block;
margin: 0 0 20px;
}
#final-example .column {
display: block;
float: left;
}
#final-example .column.three {
width: 203px;
margin-right: 45px;
}
#final-example .column.last {
margin: 0;
}
#final-example small {
display: block;
text-align: center;
margin: 40px 0 0;
}
#final-example .member {
width: 203px;
float: left;
margin-right: 45px;
}
#final-example .member:last-child {
margin: 0;
}
#final-example .member img {
max-width: 100%;
}
#final-example .closed {
color: #d13916;
}
#final-example .open {
color: #67b512;
}
#menu-items ul {
list-style: none;
margin: 0;
padding: 20px 0;
text-align: center;
font-size: 18px;
}
#menu-items ul li a {
text-decoration: none;
font-weight: bold;
}
.price {
float: right;
font-size: 18px;
font-weight: bold;
color: #353535;
}
#contact {
width: 320px;
margin: 0 auto;
}
#contact-form label {
display: block;
font-size: 11px;
font-weight: bold;
text-transform: uppercase;
}
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
border: solid 2px #353535;
outline: none;
font-size: 18px;
padding: 10px;
margin: 0 0 10px;
width: 300px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
text-rendering: optimizelegibility;
}
#contact-form textarea {
resize: vertical;
height: 120px;
}
#contact-form input[type="checkbox"] + label {
display: inline;
cursor: pointer;
}
When I try to do this:
#final-example #nav {
margin: -27px 0 0;
position: absolute;
}
to this
#final-example #nav {
margin: -27px 0 0;
}
this happens:
and text-align:center; did not work. Any ideas?
Here is the index.php:
<!DOCTYPE html>
<html>
<head>
<title>MicroUrb</title>
<link rel="stylesheet" href="assets/styles.css">
</head>
<body id="final-example">
<div class="wrapper">
<div id="banner">
<a href="/" title="Return to Home">
<img src="assets/img/banner0.jpg" alt="MicroUrb">
<div id="banner__text-content">
<h1 id="banner__title">MicroUrb</h1>
</div>
</a>
</div><!-- banner -->
<div id="nav">
<ul>
<li>Home</li>
<li>Team</li>
<li>Products</li>
<li>Contact</li>
</ul>
</div><!-- nav -->
<div class="content">
<div id="footer" class="cf">
<div class="column three">
<strong>Phone</strong>
609.505.3395
</div><!-- column -->
<div class="column three">
<strong>Location</strong>
<!-- location to go here -->
</div><!-- column -->
<div class="column three last">
<strong>Hours</strong>
<em>Tuesday - Thursday</em><br>
1:00pm - 9:00pm<br><br>
<em>Friday and Saturday</em><br>
4:00pm - 11:00pm<br><br>
<em>Sunday - Monday</em>
Closed<br><br>
</div><!-- column -->
</div><!-- footer -->
<small>©2017 MicroUrb</small>
</div><!-- content -->
</div><!-- wrapper -->
<div class="copyright-info">
<?php includes('../assets/includes/copyright.php'); ?>
</div><!-- copyright-info -->
</body>
</html>
Put a z-index on the nav and set the position to relative
#final-example #nav {
margin: -27px 0 0;
z-index: 5;
position: relative;
}
I believe to get the navigation in front of the banner like you are trying to achieve you could utilise the z-index property.
Add a z-index of 1 to your #final-example #nav {} and a z-index of 0 to your #banner {} which will bring the navigation in front of the banner while keeping its absolute positioning in the centre.
The final outcome will be:
#final-example #nav {
margin: -27px 0 0;
position: absolute;
z-index: 1;
}
#banner {
position: relative;
z-index: 0;
}
Let me know if you need any other help.
You can use z-index on the nav element to make it appear above the banner if you set the banner to a lower z-index compared to the nav element.
So for example:
#final-example #nav {
z-index:1;
position:relative;
margin:-27px auto 0;
}
That said, it would be useful if you would've posted your html part as well.
Edit:
Further investigation and with a temporary asset, the code seems to work fine with the code posted above as can be seen in this JSFiddle: https://jsfiddle.net/t2d70q3y/2/
Let me know if you require further assistance.

2 different css files one page, browser applying only style from one file

I'm trying to create a new page in which I apply my own CSS and use some of the components developed here: http://aozora.github.io/bootmetro/index.html.
Problem is that on one component the browser is only applying the style from my file and not the style defined on the .css file I downloaded from the site. Trouble is that firebug shows that the file is being tranfered to the user but somehow its not being used even if the class defined from tag is clearly defined on the other .css file.
Heres the source of the page:
<div class="header">
<div class="right textHeader">
<div class="left logo"><p class="title">Portal para la gestión y control<br>
de la implementación del sistema de información PAI
</p>
</div>
<div class="right textInfo">
<div class="left greetTime">
<img src="/Content/Images/calendar.png"> 27/04/2013 12:15:25 p.m.
</div>
<div class="greet">
Hola, <a class="username" href="/Account/Manage" title="Manage">administrador</a>!
<form action="/Account/LogOff" id="logoutForm" method="post"><input name="__RequestVerificationToken" value="gsGgnTHMhT55z7aQFmarrbLlUQK4x2nuMNZP_kXbqRx2j3kWOhNSc3RptPzG8118PGgkQOpU_erRuCcZ7GvH4FhKNAlaCug0dFUGKjiFqbP5wjhFTJConDCIZzZppq090" type="hidden"> Desconectarse
</form> </div>
</div>
</div>
<div class="left imgHeader">
<img src="/Content/Images/logo-minSalud.png">
<img src="/Content/Images/logo-prosperidad.png">
</div>
</div>
<div id="categories">
Inicio
</div>
<div id="content">
<h2>Bienvenido</h2>
This is the item I want to apply the class to
Administrar banco de información**Administrar usuariosReportes gerenciales
</div>
Here's the firebug screenshot:
And here's the screenshot showing that both files are being downloaded:
Here's my css file:
body {
color: #353535;
background-color: #fff;
background: url("Images/bg.jpg") repeat-x 0 0 #EBEBEB;
font-size: 1em;
margin: 0;
padding: 0;
font-family: 'Maven Pro', sans-serif;
}
header, footer, nav, section
{
display: block;
}
.editButton {
background:url(Images/editarPequeño.ico);
background-repeat: no-repeat;
display: block;
text-indent: -9999px; /* hides the link text */
}
.deleteButton {
background:url(Images/deletePequeno.ico);
background-repeat: no-repeat;
display: block;
text-indent: -9999px; /* hides the link text */
}
.left
{
float:left
}
.right {
float: right;
}
.navBar {
background-color: #F7921E;
height: 48px;
}
/*//////////TABLA LISTADO /////////////////////////*/
table {
color: #333;
/*font-family: Helvetica, Arial, sans-serif;*/
/*width: 640px;*/
border-collapse:
collapse; border-spacing: 0;
margin-left:auto;
margin-right:auto;
}
td, th {
border: 1px solid transparent; /* No more visible border */
height: 30px;
transition: all 0.3s; /* Simple transition for hover effect */
}
th {
background: #5DBCD2; /* Darken header a bit */
font-weight: bold;
border: 1px solid #CCC;
}
td {
background: #FAFAFA;
text-align: center;
}
/* Cells in even rows (2,4,6...) are one color */
tr:nth-child(even) td { background: #F1F1F1; }
/* Cells in odd rows (1,3,5...) are another (excludes header cells) */
tr:nth-child(odd) td { background: #FEFEFE; }
tr td:hover { background: #666; color: #FFF; } /* Hover cell effect! */
/*///////////////////////////////*/
.title {
/*font-family: 'Montserrat', sans-serif;*/
/*width: 500px;*/
font-weight: bold;
}
.greet {
font-size: 0.78em;
}
.textInfo {
width:50%;
/*height:100%;*/
}
/*///////////////////////////////////////*/
.listView {
margin-left: 0px;
list-style: none outside none;
}
ul{
display: block;
list-style-type: disc;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
}
.metrouicss .listview:before, .metrouicss .listview:after {
display: table;
content: "";
}
/*///////////////////////////////////////*/
.okButton {
background: -moz-linear-gradient(center top , #ff6600 0px, #ff6600 100%) repeat scroll 0 0 transparent;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 5px 5px 5px 5px;
color: #FFFFFF;
opacity: 0.75;
padding: 6px 10px;
margin-top:5px;
display:block;
margin:0px auto;
}
.okButton {
transition: opacity 0.2s ease 0s;
}
.footer {
width: 100%;
height: 100px;
background: none repeat scroll 0% 0% rgb(138, 188, 203);
margin-top:50px;
color: rgb(0, 0, 0);
font-size: 0.7em;
border-top: 1px solid rgb(98, 143, 156);
}
.logo {
width:50%
}
.textHeader {
width:63%
}
.greetTime {
font-size: 0.58em;
/*width: 15px;*/
}
.header {
height: 122px;
width: auto;
margin-top:20px;
/*margin-left:5%;*/
/*margin: 0px auto;*/
}
/* Styles for basic forms
-----------------------------------------------------------*/
fieldset {
border: 1px solid #ddd;
padding: 0 1.4em 1.4em 1.4em;
margin: 0 0 1.5em 0;
}
legend {
font-size: 1.2em;
font-weight: bold;
color:black
}
textarea {
min-height: 75px;
}
.editor-label {
margin: 1em 0 0 0;
}
.editor-field {
margin: 0.5em 0 0 0;
}
/* Styles for validation helpers
-----------------------------------------------------------*/
.field-validation-error {
color: #f00;
}
.field-validation-valid {
display: none;
}
.input-validation-error {
border: 1px solid #f00;
background-color: #fee;
}
.validation-summary-errors {
font-weight: bold;
color: #f00;
}
.validation-summary-valid {
display: none;
}
/*CSS Aditions*/
BODY { font-size: 1em; margin: 0; }
DIV#header DIV.title, DIV.item H3, DIV.item H4, DIV.pager A
{
/*font: bold 1em "Arial Narrow", "Franklin Gothic Medium", Arial;*/
}
A#loginLink {
font-size:1.5em;
}
/*DIV#header { background-color: #5DBCD2; border-bottom: 2px solid #111; color: black; }*/
DIV#header DIV.title { font-size: 2em; padding: .6em; }
DIV#title { font-size: 2em; padding: .6em;float:right }
DIV#headerImages { float:left}
/*DIV#content { border-left: 2px solid gray; margin-left: 9em; padding: 1em; }*/
DIV#categories { float: left; width: 8em; padding: .3em; }
DIV.item { border-top: 1px dotted gray; padding-top: .7em; margin-bottom: .7em; }
DIV.item:first-child { border-top:none; padding-top: 0; }
DIV.item H3 { font-size: 1.3em; margin: 0 0 .25em 0; }
DIV.item H4 { font-size: 1.1em; margin:.4em 0 0 0; }
DIV.pager { text-align:right; border-top: 2px solid silver;
padding: .5em 0 0 0; margin-top: 1em; }
DIV.pager A { font-size: 1.1em; color: #666; text-decoration: none;
padding: 0 .4em 0 .4em; }
DIV.pager A:hover { background-color: Silver; }
DIV.pager A.selected { background-color: #353535; color: White; }
DIV#categories A
{
font: bold 1.1em "Arial Narrow","Franklin Gothic Medium",Arial; display: block;
text-decoration: none; padding: .6em; color: Black;
border-bottom: 1px solid silver;
}
DIV#categories A.selected { background-color: #666; color: White; }
DIV#categories A:hover { background-color: #CCC; }
DIV#categories A.selected:hover { background-color: #666; }
And heres the css file i downloaded
/* Metro Tiles
-------------------------------------------------- */
.bg-color-blue {
background-color: #0072BC !important;
}
.bg-color-blueDark {
background-color: #662D91 !important;
}
.bg-color-green {
background-color: #01a31c !important;
}
.bg-color-greenDark {
background-color: #008641 !important;
}
.bg-color-red {
background-color: #bc1c48 !important;
}
.bg-color-yellow {
background-color: #ffc40d !important;
}
.bg-color-orange {
background-color: #CD4900 !important;
}
.bg-color-pink {
background-color: #c3325f !important;
}
.bg-color-purple {
background-color: #603cba !important;
}
.bg-color-darken {
background-color: #1c1c1c !important;
}
.metro {
overflow: hidden;
}
.metro .carousel-control {
top: 20%;
}
.metro .metro-sections {
height: auto;
position: relative;
overflow: hidden;
width: 10000px;
}
.metro-sections h2 {
margin-left: 5px;
font-family: "Open Sans",Arial,Helvetica,Sans-Serif;
font-weight: 300;
text-transform: lowercase;
}
.metro .metro-sections .metro-section {
position: relative;
float: left;
/*width: 810px !important;*/
width: auto;
height: auto;
margin-right: 75px;
}
/* fixed widths for tile sections
units are measured per square tile width, i.e.: tile-span-1 = 160px = 1 square tile width (including margin)
*/
.metro .metro-sections .metro-section.tile-span-1 { width: 160px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-2 { width: 320px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-3 { width: 480px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-4 { width: 640px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-5 { width: 640px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-6 { width: 800px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-7 { width: 960px; margin-left: 0;}
.metro .metro-sections .metro-section.tile-span-8 { width: 1120px; margin-left: 0;}
/*default tile definition */
.metro .tile {
position: relative;
display: block;
float: left;
margin: 5px;
padding: 0;
/*padding-bottom: 1px;*/
width: 150px;
height: 150px;
color: #FFF;
cursor: pointer;
overflow: hidden;
text-decoration: none;
background-color: #2C83EF;
}
.metro .tile:hover {
outline: 3px #225a68 solid;
}
.scroll {
-webkit-transition:left 0.6s ease; /* here the animation is set on 5 seconds */
-moz-transition:left 0.6s ease;
-o-transition:left 0.6s ease;
transition:left 0.6s ease;
}
/* Metro Tiles Templates
-------------------------------------------------- */
.metro .tile.square.text {
width: 110px;
height: 110px;
padding: 20px;
}
.metro .tile.square.image {
width: 150px;
height: 150px;
padding: 0;
}
.metro .tile.square.image img {
max-width: 150px;
max-height: 150px;
}
.metro .tile.squarepeek {
width: 150px;
height: 300px;
}
.metro .tile.squarepeek .text-inner {
width: 110px;
height: 110px;
padding: 20px;
}
.metro .tile.wide.text {
width: 270px;
height: 110px;
padding: 20px;
}
.metro .tile.wide.image {
width: 310px;
height: 150px;
}
.metro .tile.wide.image.collection img {
max-width: 158px;
max-height: 150px;
float: left;
}
/* template for full image */
.metro .tile.wide.imagetext.wideimage {
width: 310px;
height: 150px;
padding: 0;
}
/* template with normal 80x80 image */
.metro .tile.wide.imagetext {
width: 270px;
height: 110px;
padding: 20px;
}
.metro .tile.wide.imagetext .textover-wrapper {
position: absolute;
bottom: 0;
width: 270px;
height: 48px;
padding: 2px 20px;
background-color: inherit;
}
.metro .tile.widepeek {
width: 310px;
height: 300px;
}
/* Default Tile
-------------------------------------------------- */
.metro .tile.app .image-wrapper {
display: block;
width: 150px;
height: 80px;
margin-top: 20px;
padding: 8px 0;
text-align: center;
vertical-align: middle;
}
.metro .tile.app .image-wrapper img {
max-width: 80px;
max-height: 80px;
margin: 0 auto;
}
.metro .tile .app-label {
bottom: 5px;
font-size: 12px;
left: 20px;
position: absolute;
}
.metro .tile .app-count {
position: absolute;
right: 20px;
bottom: 10px;
font-size: 14px;
font-weight: bold;
}
.metro .tile.wide.app {
width: 310px;
height: 150px;
}
.metro .tile.wide.app .image-wrapper {
width: 310px;
}
.image-wrapper span.icon {
font-size: 80px;
height: 80px;
line-height: 80px;
width: 80px;
}
/*
-------------------------------------------------- */
.metro .tile.square.text .text-big {
font-size: 76px;
line-height: 76px;
text-align: left;
overflow: hidden;
}
.metro .tile.square.text.tilesquareblock .text {
font-size: 14px;
font-weight: bold;
text-align: left;
overflow: hidden;
}
/* normal header in 1 line of wrapped text*/
.metro .tile .text-header {
font-family: "Open Sans",Arial,Helvetica,Sans-Serif;
font-weight: 300;
font-size: 34px;
line-height: 36px;
max-height: 36px;
text-align: left;
overflow: hidden;
}
/* One string of large text wrapped over a maximum of three lines.*/
.metro .tile .text-header3 {
font-family: "Open Sans",Arial,Helvetica,Sans-Serif;
font-weight: 300;
font-size: 34px;
line-height: 36px;
text-align: left;
max-height: 110px;
overflow: hidden;
}
/* 1 line of regular text (not wrapped) */
.metro .tile .text {
font-size: 15px;
line-height: 18px;
height: 18px;
font-weight: normal;
text-align: left;
overflow: hidden;
}
/* regular text wrapped over a maximum of 2 lines */
.metro .tile .text2 {
font-size: 15px;
font-weight: normal;
line-height: 20px;
max-height: 44px;
overflow: hidden;
text-align: left;
}
/* regular text wrapped over a maximum of 3 lines */
.metro .tile .text3 {
font-size: 15px;
line-height: 18px;
font-weight: normal;
text-align: left;
max-height: 56px;
overflow: hidden;
}
/* regular text wrapped over a maximum of 4 lines */
.metro .tile .text4 {
font-size: 15px;
line-height: 18px;
font-weight: normal;
text-align: left;
max-height: 72px;
overflow: hidden;
}
/* regular text wrapped over a maximum of 5 lines */
.metro .tile .text5 {
font-size: 15px;
line-height: 18px;
font-weight: normal;
text-align: left;
max-height: 92px;
overflow: hidden;
}
/* Image Only Tiles
-------------------------------------------------- */
.metro .tile.square.image img {
max-width: 150px;
max-height: 150px;
}
/* Wide Text Only Tiles
-------------------------------------------------- */
.metro .tile .column {
display: block;
float: left;
width: 130px;
}
.metro .tile .column2-label {
display: block;
float: left;
width: 90px;
}
.metro .tile .column2-text {
display: block;
float: left;
width: 160px;
}
.metro .tile .column3-label {
display: block;
float: left;
width: 50px;
}
.metro .tile .column3-text {
display: block;
float: left;
width: 200px;
}
/* Wide Image Only Tiles
-------------------------------------------------- */
.metro .tile.wide.image .mini-tiles {
display: inline-block;
float: left;
width: 152px;
height: 150px;
}
.metro .tile.wide.image .mini-tiles img {
display: inline-block;
float: left;
max-width: 75px;
max-height: 75px;
border-left: 1px solid #2A2A2A;
}
/* Wide Image & Text Tiles
-------------------------------------------------- */
.metro .tile.wide.imagetext .column-text,
.metro .tile.wide.text .column-text {
display: block;
float: left;
width: 180px;
padding-left: 10px;
}
.metro .tile.wide.text .column-text-big {
display: block;
float: left;
width: 80px;
}
.metro .tile.wide.imagetext .image-wrapper {
display: block;
float: left;
width: 80px;
height: 80px;
}
.metro .tile.wide.imagetext .image-wrapper img {
max-width: 80px;
max-height: 80px;
}
/* ListView
-------------------------------------------------- */
.listview-container.grid-layout {
border: solid 2px rgba(0, 0, 0, 0.13);
height: 240px;
overflow: auto;
padding: 2px;
background-color: #FFF;
}
.mediumListIconTextItem {
display: inline-block;
position: relative;
vertical-align: top;;
width: 282px;
height: 70px;
padding: 5px;
margin-bottom: 7px;
margin-right: 24px;
border: solid 3px transparent;
overflow: hidden;
background-color: #FFF;
cursor: pointer;
}
.mediumListIconTextItem:hover {
border: solid 3px #b3b3b3;
background-color: #b3b3b3;
}
.mediumListIconTextItem img.mediumListIconTextItem-Image {
display: inline-block;
vertical-align: top;;
width: 60px;
height: 60px;
margin: 5px;
}
.mediumListIconTextItem .mediumListIconTextItem-Image[class^="icon-"],
.mediumListIconTextItem .mediumListIconTextItem-Image[class*=" icon-"] {
display: inline-block;
width: 60px;
height: 60px;
font-size: 60px;
line-height: 60px;
margin: 5px;
}
.mediumListIconTextItem .mediumListIconTextItem-Detail {
display: inline-block;
vertical-align: top;;
margin: 5px;
}
.mediumListIconTextItem.selected {
background-color: #4617b4;
}
.mediumListIconTextItem.selected:after {
position: absolute;
top: 5px;
right: 5px;
width: 16px;
height: 16px;
font-family: 'IcoMoon';
content: "\e03c";
color: #FFF;
font-size: 16px;
}
.mediumListIconTextItem.selected:hover {
border: solid 3px #b3b3b3;
background-color: #4617b4;
}
.mediumListIconTextItem.selected .mediumListIconTextItem-Detail,
.mediumListIconTextItem.selected .mediumListIconTextItem-Detail h4,
.mediumListIconTextItem.selected .mediumListIconTextItem-Detail h6 {
color: #FFF;
}
/* Special undocumented tiles for ads
-------------------------------------------------- */
#ad-container {
background-color: #0072BC;
height: 90px;
margin-top: 10px;
text-align: center;
width: 100%;
}
/*Button (125x125)*/
.metro .tile.ad.ad125 {
width: 125px;
height: 125px;
padding: 12px 13px 13px 12px;
}
/*Small Rectangle (180x150)*/
.metro .tile.wide.ad.ad125 {
width: 180px;
height: 150px;
padding: 0 65px;
}
All the rules from the downloaded file that affect the .tile class start like this .metro .tile which means that the .tile element must be a descendant of a .metro element (an element with class metro)
You html does not show your link being inside a .metro element so the styles do not apply ..
it seems that stylesheets are loaded, but from basic look at the Metro Tiles CSS I decided that you forgot to put metro class to any parent of your tile, for example add class to your content
<div id="content" class="metro">