trying to make my background image transparent - html

here is part of the CSS code, i cant seem to figure it out.
#About{
height:500px;
background: url("murano.jpg") no-repeat center;
}
I want to decrease the opacity of the imported background image

Add Opacity with your css
#About{
opacity :0.4;
height:500px;
background: url("murano.jpg") no-repeat center;
}

the best solution would be to create another div inside your #about div and position that div absolute while position your #about div to relative and give the background of this newly added div as rgba(0,0,0,0.5) where 0.5 represents the opacity
there is no css rule to provide opacity to background images.
when you put the opacity of #about div to 0.4 of course its child will inherit this property and any text inside about div will get the opacity of 0.4
<div id="about">
<div class="absolute">
</div>
</div>
#about{
position:relative;
background:url(..);
}
.absolute{
position:absolute;
background:rgba(0,0,0,0.5);
}

Use background-color: rgba(255, 255, 0, 0.3);
The 0.3 being the the alpha(opacity channel).
OR
Add an extra div to hold the background, and change the opacity there.
opacity: 0.4; filter:alpha(opacity=40);
Example :
#background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('http://i40.tinypic.com/3531bba.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
opacity: 0.4;
filter: alpha(opacity=40);
}
.head {
width: 150px;
height: 160px;
}
body {
font-family: tahoma, helvetica, arial, sans-serif;
font-size: 12px;
text-align: center;
background: #000;
color: #ddd4d4;
padding-top: 12px;
line-height: 2;
}
td,
th {
font-size: 12px;
text-align: left;
line-height: 2;
}
#wrapper {
margin: auto;
text-align: left;
width: 832px;
position: relative;
padding-top: 27px;
}
#body {
background: url(images/body_bg_1.gif) repeat-y;
width: 832px;
}
#bodyi {
background: url(images/body_top_1.gif) no-repeat;
width: 832px;
}
#bodyj {
background: url(images/body_bot_1.gif) bottom no-repeat;
padding: 1px 0;
}
#body2 {
background: url(images/body_bg_2.gif) repeat-y;
width: 832px;
}
#bodyi2 {
background: url(images/body_top_2.gif) no-repeat;
width: 832px;
}
#bodyj2 {
background: url(images/body_bot_2.gif) bottom no-repeat;
padding: 1px 0;
}
h1,
h2,
h3,
#nav,
#nav li {
margin: 0;
padding: 0;
}
#nav {
font-size: 10px;
position: absolute;
right: 0;
top: 12px;
line-height: 1.2;
padding-left: 120px;
}
#nav li {
float: left;
width: 108px;
list-style: none;
margin-left: 2px;
border-bottom: 1px solid black;
}
#nav a {
background: #738d09;
color: #2e3901;
font-weight: bold;
text-decoration: none;
display: block;
text-align: center;
padding: 1px 0;
}
#sidebar {
float: left;
width: 250px;
padding-left: 4px;
}
#sidebar .content {
padding-left: 24px;
}
#sidebar .content img {
float: left;
clear: left;
margin: 5px 5px 5px 0;
}
#sidebar .divider {
background: url(images/left_splitter.gif) center no-repeat;
height: 5px;
width: 169px;
}
#content {
float: right;
width: 462px;
}
#content1 {
float: left;
width: 800px;
}
#content1 .content {
margin: 7px 35px 7px 20px;
padding-left: 20px;
}
#content .content {
margin: 7px 55px 7px 17px;
}
#content .content table {
width: 310px;
margin-right: 0px;
}
#content .content table td,
#content .content table th {
padding-right: 10px;
}
#content .content table td.download {
text-align: right;
padding-right: 0px;
}
#content .divider {
background: url(images/right_splitter.gif) repeat-x;
height: 5px;
}
h1 {
position: absolute;
left: 0;
top: 0;
}
h2 {
font-size: 10px;
color: #cf9118;
margin: 1em 0;
}
h3 {
font-size: 10px;
margin: 1em 0;
}
h5 {
font-size: 20px;
color: #cf9118;
margin: 1em 0;
text-align: center;
}
h6 {
font-size: 18px;
margin: 1em 0;
}
p {
margin: 1em 0;
}
img {
border: 0;
}
img.left {
float: left;
margin-right: 14px;
}
img.right {
float: right;
margin-left: 14px;
}
.readmore {
text-align: right;
}
.hidden {
visibility: hidden;
}
.clear {
clear: both;
}
a {
color: #f0b33c;
font-weight: bold;
text-decoration: none;
}
a:visited {
color: #cf9118;
}
a:hover {
text-decoration: underline;
}
table a {
text-decoration: underline;
font-weight: normal;
color: #7f7c79;
}
#power {
color: #fff;
text-align: center;
}
#power a {
color: #fff;
}
<div id="background"></div>
<div class="head">
</div>
<div id="wrapper">
<ul id="nav">
<li>Inicio
</li>
<li>Sobre a banda
</li>
<li>Membros
</li>
<li>Bilhetes
</li>
<li>Galeria
</li>
<li>Área Pessoal
</li>
</ul>
<h1></h1>
<div id="body">
<div id="bodyi">
<div id="bodyj">
<div id="sidebar">
<div class="content">
<h2>Galeria de imagens</h2>
<p>Aqui poderá encontrar uma galeria de imagens da banda, com fotos de concertos, entre outras imagens.</p>
<p class="readmore">Ver
</p>
</div>
<div class="content">
<h2>Noticias</h2>
<h3>18 de Abril, 2011</h3>
<h4>"So Far Away" vai ter videoclip</h4>
<p>Muitos se questionavam se o mais recente single dos Avenged Sevenfold, "So Far Away", ia ter direito a um videoclip. Eis que surge a boa notícia para os fãs dos A7X: So Far Away vai ter videoclip. Já foram divulgadas algumas fotos do set de
filmagens.</p>
<h3>10 de Março, 2011</h3>
<h4>A7X nomeados para a Metal Hammer Golden Gods Awards 2011</h4>
<p>Os Avenged Sevenfold foram nomeados para a Metal Hammer Golden Gods Awards 2011 em duas categorias. As categorias onde os A7X estão a participar são as seguintes:
<p>
- Best International Band (Melhor Banda Internacional)
<p>
- Best Shredder (com o Synyster Gates) (Melhor Shredder)</p>
</div>
</div>
<div id="content">
<center>
<img src="images/avengeds.jpg" width="346" height="234" alt="four men walking" />
</center>
<div class="content">
<h2>O album mais recente</h2>
<img src="images/nightmare.jpg" width="82" height="80" alt="Unwired album cover" class="left" />
<p>Os californianos Avenged Sevenfold estão de volta aos discos com "Nightmare". Solos de guitarra, vocalizações rasgadas e um som contagiante continuam a ser a base do sucesso de uma das bandas de heavy-metal com mais fãs no mundo inteiro. Fundados
em 1999 por M. Shadows, Synyster Gates, Zacky Vengeance, Johnny Christ e The Rev - baterista que faleceu em Dezembro de 2009 passado e que foi substituido neste disco por Mike Portnoy, dos Dream Theater - os Avenged Sevenfold já contam com
cinco discos de originais na sua carreira.</p>
<div class="divider"></div>
<h2>Musicas com maior sucesso</h2>
<table summary="track downloads" border="0" cellspacing="0">
<tr>
<th width="55%">Faixa</th>
<th>Album</th>
<th class="hidden">Dowload links</th>
</tr>
<tr>
<td>Bat Country</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Beast and the Harlot</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Seize the Day</td>
<td>City of Evil</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Almost Easy</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Afterlife</td>
<td>Avenged Sevenfold</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Nightmare</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
<tr>
<td>Welcome to the Family</td>
<td>Nightmare</td>
<td class="download">Ouvir
</td>
</tr>
</table>
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<div align="right">
<font size="2">text</font>
</div>
</div>

you would want to add the background to the #about:after and then apply the transparency to that. there is no way to add the transparency directly to the background as far as I know.
here is a link to a good article on this.

Related

How do I stop the attribute "position: fixed" at a certain point?

How do I stop the attribute "position: fixed" at a certain point so the button in my case, isn't kind of following the user when scrolling anymore. Because I have this footer at the bottom of my page and the "book now" button overlaps the footer and I don't want that. How do I "stop" the button just above the footer?
const slideshowImages = document.querySelectorAll('#slideshow img');
let currentIndex = 0;
function showNextImage() {
console.log(slideshowImages[currentIndex]);
slideshowImages[currentIndex].style.display = 'none';
currentIndex = (currentIndex + 1) % slideshowImages.length;
slideshowImages[currentIndex].style.display = 'block';
}
console.log(slideshowImages);
setInterval(showNextImage, 5000);
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
overflow: scroll;
}
h1 {
text-align: center;
font-size: 3.5em;
}
h2 {
text-align: center;
font-size: 2em;
padding-top: 2%;
}
p {
margin: 20px 0;
line-height: 1.5;
}
ul {
list-style: none;
margin: 20px 0;
padding: 0;
}
header {
overflow: hidden;
position: relative;
}
li {
margin: 10px 0;
}
.content {
position: relative;
padding: 20px 1px;
padding-left: 2.5%;
}
img {
width: 90vw;
margin-left: auto;
margin-right: auto;
display: block;
vertical-align: top;
}
#slideshow {
position: absolute;
top: 55%;
left: 12%;
width: 300px;
height: 300 px;
}
#slideshow img {
width: 170%;
height: 170%;
object-fit: cover;
}
#menu {
position: fixed;
width: 100%;
background-color: #333;
color: #fff;
z-index: 2;
padding: 0;
}
.menu-button {
font-family: Arial;
}
#menu ul {
display: flex;
margin: 0;
padding: 0;
}
#menu li {
flex: 1;
text-align: center;
}
#menu a {
display: block;
color: #fff;
text-decoration: none;
padding: 20px;
}
#menu a:hover {
background-color: #444;
}
.Infotext {
position: absolute;
top: 57%;
left: 40%;
font-size: 1.5em;
}
.InfotextÜ {
position: absolute;
top: 53.5%;
left: 40%;
font-family: Arno Pro Caption;
font-size: 2.0em;
}
.button-24 {
position: fixed;
top: 90%;
left: 45.3%;
background: #FF4742;
border: 1px solid #FF4742;
border-radius: 6px;
box-shadow: rgba(0, 0, 0, 0.1) 1px 2px 4px;
box-sizing: border-box;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-family: nunito, roboto, proxima-nova, "proxima nova", sans-serif;
font-size: 16px;
font-weight: 800;
line-height: 16px;
min-height: 40px;
outline: 0;
padding: 12px 43px;
text-align: center;
text-rendering: geometricprecision;
text-transform: none;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
vertical-align: middle;
}
.button-24:hover,
.button-24:active {
background-color: initial;
background-position: 0 0;
color: #FF4742;
}
.button-24:active {
opacity: .5;
}
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
<div id="menu">
<ul>
<li>Home</li>
<li>Bildgalerie</li>
<li>Kontakt</li>
<li>In der Nähe</li>
</ul>
</div>
<header>
<div id="slideshow">
<img src="https://i.imgur.com/dXTFKBo.jpg" alt="Slideshow image 1" style="display: block">
<img src="https://i.imgur.com/FzwZzYw.jpg" alt="Slideshow image 2" style="display: none">
<img src="https://i.imgur.com/kIS6CTy.jpg" alt="Slideshow image 3" style="display: none">
<img src="https://i.imgur.com/UUr5jSJ.jpg" alt="Slideshow image 3" style="display: none">
</div>
<p class="InfotextÜ">Paradiso Piccolo</p>
<p class="Infotext">Das Paradiso Piccolo ist eine Ferienwohnung am See.</p>
<img id="image" src="https://i.imgur.com/O0jKPtk.jpg" alt="Foto">
</header>
<div class="content">
<h1>Das Apartment</h1>
<p>Das Apartment ist für bis zu 6 Personen geignet.<br> Im Apartment gibt es außerdem:</p>
<li>TV</li>
<li>Stereo-Anlage</li>
<li>WLAN (auf Wunsch)</li>
<li>Bücher</li>
<li>Brettspiele</li>
<li>Decken- und tragbare Ventilatoren</li>
<li>Infrarotheizung (gegen Aufpreis)</li>
<li>Kühlschrank</li>
<li>Mikrowelle</li>
<li>Geschirr und Besteck</li>
<li>Grundausstattung zum Kochen (Töpfe, Pfannen, Öl, Salz, Pfeffer)</li>
<li>Gefrierschrank</li>
<li>Herd (Gas und Elektro)</li>
<li>Bügeleisen</li>
<li>Geschirrspülmaschine</li>
<li>Waschmaschine</li>
<li>Wasserkocher</li>
<li>Nespresso-Maschine</li>
<li>Toaster</li>
<li>Grill</li>
<li>Holzkohle</li>
<li>Grillbesteck</li>
<li>Föhn</li>
<li>Shampoo, Duschgel, Seife, etc</li>
<li>Gartenmöbel (Liege, etc)</li>
<li>Kostenlose Parkplätze</li>
Bettwäsche und Handtücher sind selbst mitzunehmen!
<h1>Standort</h1>
<p>Via Cristoforo Colombo, 4, 37010 Brenzone VR, Italien</p>
<iframe src="..."></iframe>
<a href="https://www.airbnb.com/h/paradisopiccolo">
<button class="button-24" role="button">Book Now!</button>
</a>
</div>
<footer>
<p>Paradiso Piccolo</p>
<p>123 Main Street</p>
<p>Anytown, USA</p>
<button onclick="location.href='C:/Users/Charlie/Desktop/Impressum.html'">Impressum</button>
<button onclick="location.href='C:/Users/Charlie/Desktop/Datenschutz.html'">Datenschutz</button>
</footer>

Center table in responsive website

I'm currently busy with building a website and creating a responsive design. But now I have several tables in this design added the css display:block; to them. But now in my responsive design it is aligned to the left. But I want it to be aligned in the center. But when I add text-align:center; or margin:auto; it doesn't work. What can I try more?
Code:
HTML:
<table class="kalender">
<tr>
<td colspan="3">
<h1>Mei</h1>
</td>
</tr>
<tr>
<td>
<img src="Kalender/RundUmDenFinanzplatz.png" id="logos" height="150px" alt="Rund um den Finanzplatz" title="Rund um den Finanzplatz">
<h2>
Rund um den Finanzplatz Eschborn-Frankfurt
</h2>
<h4>
1 Mei 2017
</h4>
<div id="flagid"><img src="Flags/germany.png" id="flag" height="15px" alt="Duitsland" title="Duitsland">
<p>GER</p>
</div>
</td>
<td>
<img src="Kalender/GiroDItalia.png" id="logos" height="150px" alt="Giro d'Italia" title="Giro d'Italia">
<h2>
Giro d'Italia
</h2>
<h4>
5-28 Mei 2017
</h4>
<div id="flagid"><img src="Flags/italy.svg" id="flag" height="15px" alt="Italië" title="Italië">
<p>ITA</p>
</div>
</td>
<td>
<img src="Kalender/TourOfCalifornia.png" id="logos" height="150px" alt="Tour of California" title="Tour of California">
<h2>
Amgen Tour of California
</h2>
<h4>
14-20 Mei 2017
</h4>
<div id="flagid"><img src="Flags/usa.png" id="flag" height="15px" alt="USA" title="USA">
<p>USA</p>
</div>
</td>
</tr>
</table>
CSS:
.kalender {
margin: auto;
margin-top: 50px;
border-top: 2px solid white;
}
.kalender h1 {
color: #ffffff;
font-family: Century Gothic;
font-size: 50pt;
text-align: center;
}
#logos {
display: block;
margin: auto;
opacity: 0.7;
filter: alpha(opacity=70);
}
#logos:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
.kalender h2 {
color: #ffffff;
font-family: century Gothic;
font-weight: bold;
margin-top: 20px;
width: 250px;
text-align: center;
}
.kalender h4 {
color: #ffffff;
font-family: century Gothic;
text-align: center;
margin-top: 10px;
}
.kalender p {
color: #ffffff;
font-family: Century Gothic;
font-size: 12pt;
display: inline;
}
#flagid {
text-align: center;
margin-top: 10px;
}
#flagid img {
margin-right: 5px;
}
#media screen and (max-width: 720px) {
table, td, tr {
display: block;
}
.kalender td, .kalender tr {
margin-top: 0px;
margin-bottom: 50px;
margin-right: 0px;
text-align: center;
margin: auto;
}
.kalender h1 {
font-size: 30pt;
margin: 0px;
text-align: center;
width: 100%;
}
.kalender img {
margin: auto;
text-align: center;
}
.kalender {
margin: auto;
text-align: center;
}
}
You should use "text-align:center;" in style (I don't know what is the rest of your code) or in (width:100%) that include your table.
It's better to do a grid with css for responsive layout , here a solution for your code
.kalender {
margin: auto;
margin-top: 50px;
border-top: 2px solid white;
}
.kalender h1 {
color: #ffffff;
font-family: Century Gothic;
font-size: 50pt;
text-align: center;
}
#logos {
display: block;
margin: auto;
opacity: 0.7;
filter: alpha(opacity=70);
}
#logos:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
.kalender h2 {
color: #ffffff;
font-family: century Gothic;
font-weight: bold;
margin-top: 20px;
width: 250px;
text-align: center;
}
.kalender h4 {
color: #ffffff;
font-family: century Gothic;
text-align: center;
margin-top: 10px;
}
.kalender p {
color: #ffffff;
font-family: Century Gothic;
font-size: 12pt;
display: inline;
}
#flagid {
text-align: center;
margin-top: 10px;
}
#flagid img {
margin-right: 5px;
}
#media screen and (max-width: 720px) {
table, td, tr {
display: block;
}
tr{
background: #000;
position: absolute;
right: 0;
margin-right: 50%;
transform: translate(50%);
}
.kalender td, .kalender tr {
margin-top: 0px;
margin-bottom: 50px;
text-align: center;
}
.kalender h1 {
font-size: 30pt;
margin: 0px;
text-align: center;
width: 100%;
}
.kalender img {
margin: auto;
text-align: center;
}
.kalender {
margin: auto;
text-align: center;
}
}
<table class="kalender">
<tr>
<td colspan="3">
<h1>Mei</h1>
</td>
</tr>
<tr>
<td>
<img src="Kalender/RundUmDenFinanzplatz.png" id="logos" height="150px" alt="Rund um den Finanzplatz" title="Rund um den Finanzplatz">
<h2>
Rund um den Finanzplatz Eschborn-Frankfurt
</h2>
<h4>
1 Mei 2017
</h4>
<div id="flagid"><img src="Flags/germany.png" id="flag" height="15px" alt="Duitsland" title="Duitsland">
<p>GER</p>
</div>
</td>
<td>
<img src="Kalender/GiroDItalia.png" id="logos" height="150px" alt="Giro d'Italia" title="Giro d'Italia">
<h2>
Giro d'Italia
</h2>
<h4>
5-28 Mei 2017
</h4>
<div id="flagid"><img src="Flags/italy.svg" id="flag" height="15px" alt="Italië" title="Italië">
<p>ITA</p>
</div>
</td>
<td>
<img src="Kalender/TourOfCalifornia.png" id="logos" height="150px" alt="Tour of California" title="Tour of California">
<h2>
Amgen Tour of California
</h2>
<h4>
14-20 Mei 2017
</h4>
<div id="flagid"><img src="Flags/usa.png" id="flag" height="15px" alt="USA" title="USA">
<p>USA</p>
</div>
</td>
</tr>
</table>

Responsive menu html css on small screens

I want to make a responsive menu with only html and css , no Javascript.
I'm still practising.. maybe anyone can see why my menu doesn't appear when clicking on the label?
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="Frank.css">
<meta name="author" content="Frank Van Hoek">
<title>Frank</title>
</head>
<body>
<header>
<div class="logo" class="cfx">
<img class="imglogo" class="cfx" src="afbeeldingen/logo.png" alt="Logo">
</div>
<div class="facebook" class="cfx"></div>
<img class="facebook" class="cfx" src="afbeeldingen/facebook.png" alt="facebook">
</header>
<div class="wrapper" class="cfx">
<nav class="normaal" class="cfx">
<ul class="menu" class="cfx">
<li class="actief">Home</li>
<li>Leden</li>
<li>Parken</li>
<li>Evenementen</li>
<li>Over ons</li>
</ul>
</nav>
/************HAMBURGER***************/
<nav class="hamburger">
<input type="checkbox" id="menu-toggle">
<label for="menu-toggle"></label>
<ul>
<li class="actief">Home</li>
<li>Leden</li>
<li>Parken</li>
<li>Evenementen</li>
<li>Over ons</li>
</ul>
</nav>
<div class="content" class="cfx">
<h2>BMX : Streetculture in Antwerp</h1>
<video controls><source src="afbeeldingen/StreetcultureInAntwerp.mp4" type="video/mp4"></video>
<p>Onze A.Way leden in dit filmpje zijn Tarik Begdouri, Zeno Peeters, Koen Vanden Broeck en Dimitri Huybrechts. De andere rijders zijn Niels Mertens, Stef de Backer, Brian O' Brien, Jonas van Oosterbosch en Juno Vereecken. Het werd gefilmd en gemonteerd door onze rijder Ilyas Deckers en de achtergrondmuziek is "Al'Tarba Vs Lord Lhus - 3 Amigos feat Dirty Dike & Jace Abstract".</p>
<h1>Nieuwsfeeds</h1>
<div class="nieuwsfeed">
<p class="bericht">
Dit weekend is het de 'Braaab BMX Contest 2015' in '040 BMX park' in Eindhoven. Dit wil je niet missen! Meer informatie vind je op de facebookpagina.
</p>
<p class="datum">
4 maart 2015
</p>
</div>
<div class="nieuwsfeed">
<p class="bericht">
Iemand die deze rail durft te grinden? - Locatie: Aan de schelde, niet ver van ATV
</p>
<p class="datum">
2 maart 2015
</p>
</div>
<div class="nieuwsfeed">
<p class="bericht">
Reminder!!! Deze zondag 2de meeting ivm Bmx jam stadspark - Locatie: Fietsenfikser - Tijdstip: 13u
</p>
<p class="datum">
26 februari 2015
</p>
</div>
<div class="nieuwsfeed">
<p class="bericht">
Deze vrijdag Pizza Friday om 5u in het Stadspark! Be there!
</p>
<p class="datum">
25 februari 2015
</p>
</div>
</div>
<footer>
<p>© All rights reserved - 2015</p>
</footer>
</div>
</body>
</html>
CSS
html
{
font-family: Arial, sans-serif;
height:100%;
margin: 0;
padding: 0;
}
img , video;
{
max-width: 100%;
height: auto;
}
body
{
height:inherit;
margin: inherit;
padding: inherit;
background-color: #000;
}
.wrapper
{
max-width: 900px;
min-width: 400px;
min-height:100%;
margin: 0 auto;
background-color: #000;
}
header
{
background-image:url(afbeeldingen/skyline.png);
margin: auto;
height: 336px;
width: inherit;
}
.logo
{
padding: 0 1.25em;
float: left;
}
.imglogo
{
width: 170px;
height: 170px;
}
.facebook
{
width: 40px;
height: 40px;
text-align:right;
float:right;
padding-top: 30px;
}
nav
{
width: 100%;
padding: 0px auto 0px auto;
}
ul.menu
{
list-style-type: none;
margin: 5px 10% 5px 10%;
padding: 5px auto 5px auto;
left: 0;
text-align: center;
}
.menu li
{
float:left;
margin: 5px auto 5px auto;
padding: 0px 1.875em 0px 1.875em;
background-color: #000;
text-align: center;
}
.menu li:first-child
{
padding: 0px 1.875em 0px 1.875em;
}
.menu li > a
{
display: block;
padding: 10px 0px 10px 0px;
margin: 0px 0px 0px 0px;
text-decoration: none;
color: #fff;
}
.menu li:hover, li.actief
{
background-color: #f08222;
}
.menu li:hover > a, li.actief >a
{
color: #000;
}
.hamburger
{
display: none;
}
.content
{
color: #fff;
display:block;
margin: 50px 7.7777777777777777777777777777778% 70px 7.7777777777777777777777777777778%;
}
.content video
{
width: 760px;
height: auto;
}
.content h1
{
text-decoration: underline;
margin: 50px auto;
}
.nieuwsfeed
{
margin: 30px auto;
padding: 0.625em;
border: 1px solid #fff;
border-radius: 5px;
}
.datum
{
text-align: right;
font-size: 0.8em;
}
.content a:link
{
color: #f08222;
}
.content a:visited
{
color: #e2ff00;
}
footer p
{
color: #fff;
font-size: 0.9em;
text-align: center;
margin: 200px auto 40px auto;
}
/**************************
* MEDIA QUERY *
*************************/
#media screen and (max-width: 820px)
{
html, body {
height: 100%;
}
body {
margin: 0;
overflow-x: hidden;
font-family: Arial, sans-serif;
}
.normaal
{
display:none;
}
.hamburger
{
display: inline-block;
}
#menu-toggle {
display: none;
}
#menu-toggle:checked ~ .hamburger ul{
left:0;
}
#menu-toggle:checked ~ .content {
left:240px;
}
#menu-toggle:checked + label {
left:250px;
}
label[for="menu-toggle"] {
position: fixed;
left:60px;
top:300px;
width: 30px;
height: 30px;
background-color: #0f0;
z-index: 2;
}
.hamburger ul{
position: fixed;
width: 240px;
height: 100%;
top:300px;
left: -240px;
background-color: #e34dd2;
color: white;
}
.hamburger ul {
margin: 0;
padding: 0;
list-style: none;
}
.hamburger li a {
display: block;
padding:0.5em 1em;
color: white;
border-bottom: 1px #424240 solid;
}
.container {
position: relative;
left:0;
padding: 2em;
}
nav, .container, label[for="menu-toggle"] {
-webkit-transition: left 0.5s;
transition: left 0.5s;
}
}
/*************************
* C L E A R F I X *
*************************/
.cfx::before, .cfx::after {
display: table;
line-height: 0;
content: "";
}
.cfx::after {
clear: both;
}
It would make more sense to use a responsive framework, such as Bootstrap, or Foundation.
Here is a simplistic example for a responsive navigation menu which utilises bootstrap.
Responsive navigation bar Preview
Responsive navigation bar Download
You have this:
.hamburger ul{
position: fixed;
width: 240px;
height: 100%;
top:300px;
left: -240px;
background-color: #e34dd2;
color: white;
}
position: fixed; means that its position values are in relation to the window/viewport. So having left: -240px; will move this element out of the viewport (i.e. make it invisible). Do you really want this? Even if that's intentionally and supposed to work together with this rule
#menu-toggle:checked ~ .hamburger ul{
left:0;
}
...to move it in, they are in the wrong order - the former rule will most likely overwrite the other one, making the element invisible...

How to place my footer?

I'm having a problem, i'm just a beginner and i would like to improve my CSS and HTML skills, so if you have some tips please post it here,
so my problem is about my footer, it is not on the right place, (on bottom, center of the page)
so someone help me please?
my html:
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title></title>
</head>
<body>
<div id="header">
<p id="nome">João Pedro</p>
<p id="email">jp_5_5#hotmail.fr</p>
<p id="imagem"><img src="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xfp1/t1.0-9/10250173_10203771744604525_8177123278861015451_n.jpg" style="width: 50px;
height: 50px" /></p>
</div>
<div class="left">
<p>Nome</p>
<hr>
<p>Email</p>
<hr>
<p>Contacto</p>
<hr>
<p>Sobre</p>
<hr>
<p>Mais</p>
<hr>
<p>Jogos</p>
<hr>
<p>Videos</p>
</div>
<div class="right">
<p id=boss><img src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn2/t1.0-9/s720x720/564356_10200810585497398_1364591551_n.jpg" style="height: 300px"/></p>
<div id="texto"><h3>O que é o Jejum de Jesus? -Vocês perguntam.</h3>
<p>O Jejum de Jesus é onde nós nos santificamos a Deus para receber o Espirito Santo.</p>
<p>Durante 40 dias iremos nos desapegar das coisas mundanas tais como:</p>
<ul>
<li>Internet</li>
<li>Musica</li>
<li>Jogos</li>
</ul>
</div>
<div id="footer"></div>
</body>
</html>
my css:
body {
background-color: #e7e7e7;
}
div {
border-radius: 5px;
}
#header {
margin: auto;
position: relative;
height: 60px;
width: 98%;
background-color: #230f65;
margin-bottom: 17px;
}
.left {
float: left;
margin-left: 14px;
position: relative;
background-color: #bdabf8;
width: 10%;
height: 400px;
margin-bottom: 17px;
}
.right {
float: right;
margin-right: 14px;
position: relative;
background-color: #dfd7f7;
width: 86%;
height: 400px;
margin-bottom: 17px;
border: 1px solid black;
}
.left {
text-align: center;
padding-top: 19px;
margin-bottom: 17px;
}
#footer {
position: fixed;
bottom: 0;
background-color: #230f65;
width: 85%;
}
#nome {
color: #ffffff;
float: left;
padding-left: 30px;
padding-top: 5px;
font-family: sans-serif, Verdana;
}
#email {
float: right;
padding-top: 3px;
padding-right: 10px;
font-family: sans-serif, Verdana;
color: #ffffff;
}
a:hover {
font-weight: bold;
}
p > img {
border-radius: 100%;
}
#imagem {
padding-top: 5px;
padding-left: 140px;
}
#boss {
padding-top: 33px;
float: left;
padding-left: 15px;
}
#texto {
padding-left: 255px;
}
You need to set a height for your footer, as it (yet) has not content and thus no height.
#footer {
position: fixed;
bottom: 0;
background-color: #230f65;
width: 85%;
height: 100px;
}
If you want your footer to stick to the bottom, take a look at http://cssstickyfooter.com
Also, to center the footer, in this case use left: 7.5%;, which is have the remaining space on the sides of the footer. (100% - 85% equals 15%, half of it on the left, half on the right)

Tables in HTML and CSS

I would like the table inside this image: http://postimg.org/image/tlkfdlao3/
to be aligned like: http://postimg.org/image/motp2rkit/
This is my Html code:
<table>
<tr>
<td width="132px">
<span>iNotes è qui!</span>
<br />
<p id="inotesText">Una nuova app per prendere note in un modo completamente nuovo ed intuitivo!</p>
</td>
<td width="52px">
<img src="images/pencil.png" alt="pencil" />
</td>
</tr>
</table>
and CSS:
#pencil {
padding-left:0px;
width: 52px;
height: 204px;
}
#appStoreAvailable {
padding-top:50px;
width: 149px;
height: 101px;
}
#description1 {
}
#description1 span  {
color:#2d2d2d;
font-size:16px;
}
#inotesText {
text-align: left;
font-weight: 400;
font-size: 13px;
color: #616161;
}
Here's a rough idea how you might lay this out with CSS. Realize that this is incomplete and doesn't account for browser variation.
http://jsfiddle.net/93TBf/2
.wrapper {
margin: 30px;
padding: 15px;
display: inline-block;
overflow: hidden;
background-color: #fff;
border-radius: 10px;
box-shadow: 2px 2px 15px #aaa;
font-family: arial;
}
.header {
border-bottom: 1px solid #bbb;
padding: 8px 0;
overflow: hidden;
}
.icon {
float: left;
margin-right: 10px;
}
.item {
float: right;
margin-left: 10px;
}
<div class="wrapper">
<div class="header">
<img class="icon" src="http://placehold.it/50x50" />
<strong>iNotes HD</strong>
<br />Utility
<button>0,89 $</button>
</div>
<div class="body">
<img class="item" src="http://placehold.it/50x150" />
<h2>iNotes e qui!</h2>
Una nuova app per prendere note in un
</div>
</div>
You should use li
for example
<ul class="yourclass">
<li>
Yourcontent
</li>
</ul>
This is the best you can do to layout!