Galera,
In the link below, the top of the site, that is, the header that is the background photo along with the menu, they occupy the entire screen of the browser, regardless of being a pc, tablet or smartphone, how do I apply this effect?
Galera,
In the link below, the top of the site, that is, the header that is the background photo along with the menu, they occupy the entire screen of the browser, regardless of being a pc, tablet or smartphone, how do I apply this effect?
Here's what I wanted
* {margin:0; padding: 0;}
html, body {
height:100%;
}
.header {
width:100%;
height:auto;
min-height:100%;
/*
aqui é onde acontece a mágica,
a propriedade height:auto e min-height: 100%
fará com que esta div ocupe sempre a altura total
do navegador, mesmo quando redimensionado
*/
background:cornflowerblue;
}
Credits: link
Create a <div>
, for example <div class="barra-topo">
with content: background, buttons, fields, and so on. In CSS of the background use widht: 100%;
for the background to fill the entire screen.
You will have to create the viewports so that they change according to the device. Notice that the bar model is the same, but the content changes. Search for CSS media queries.