0
I have the componente1
and the componente2
follow the example:
body {
margin: 0;
}
.componente1 {
width:250px;
float: left;
background-color: green;
height: 340px;
}
.componente2 {
width:250px;
height: 340px;
float:left ;
background-color: red;
}
@media only screen and (max-width: 601px) {
.componente1 {
margin-top: 345px;
}
.componente2 {
margin-top:-345px;
}
}
<div>
<div class="componente1">
</div>
<div class="componente2">
</div>
</div>
Goal and do the componente2
stay above the componente1
in resolution below 600px
width. This example works in IE and Chrome, but in Firefox 30px
overwriting the componente1
.
Recalling that the answer has to be compatible with the main navigation vehicles.
Have you tried using percentage instead of pixel?
– KhaosDoctor
Already but I get very incompatible but try there sometimes you can do right.
– valdir silva
Can you put an example of how you want it to look? for me it looks like Chrome and FF... http://jsfiddle.net/cwdrhpke/show/
– Sergio
Replace "@media only screen and (max-width: 601px)" with "@media only screen and (min-width: 601px)", I use this a lot and have no problem and always use "min"
– ivan veloso