WebSite X5Help Center

 
Vincenzo Errico
Vincenzo Errico
User

Margin-top  it

Autor: Vincenzo Errico
Visited 477, Followers 1, Udostępniony 0  

Ciao,

in alcune pagine ho avuto la necessità di inserire questo codice:

<style> #imContent {margin-top: -50px !important} </style>

ora avrei necessità (delle stesse pagine) di avere un margin-top -25px solo per l'ultimo breakpoint, cioè 480.

E' possibile?

Graize!

Posted on the
7 ODPOWIEDZI
Skeggia 12
Skeggia 12
Moderator

lo inserisci in un @media...

@media  (max-width: 479px) {...codice...}

dovrebbe funzionare...

Czytaj więcej
Posted on the from Skeggia 12
Vincenzo Errico
Vincenzo Errico
User
Autor

Ti ringrazio, mi potresti dare il codice in dettaglio e dove inserirlo? Grazie...

Czytaj więcej
Posted on the from Vincenzo Errico
Mirko Boschetti
Mirko Boschetti
Moderator

Prova cosi:

<style>
@media  (max-width: 479px){
 #imContent {margin-top: -25px !important}
 }
</style>

nel tag head......wink

Czytaj więcej
Posted on the from Mirko Boschetti
Vincenzo Errico
Vincenzo Errico
User
Autor

Grazie wink

Czytaj więcej
Posted on the from Vincenzo Errico
Vincenzo Errico
Vincenzo Errico
User
Autor

Mirko, così il codice è corretto?

<style>
 #imContent {margin-top: -50px !important}
@media (max-width: 719px){
 #imContent {margin-top: -25px !important}
}
</style>

Oppure devo separarli in due "style"?

<style>
#imContent {margin-top: -50px !important}
</style>

<style>
@media (max-width: 599px){
 #imContent {margin-top: -25px !important}
}
</style>

Czytaj więcej
Posted on the from Vincenzo Errico
Vincenzo Errico
Vincenzo Errico
User
Autor

però entrambi a 719px wink

Czytaj więcej
Posted on the from Vincenzo Errico
Skeggia 12
Skeggia 12
Moderator

li puoi mettere insieme nello stesso <style> </style>

Czytaj więcej
Posted on the from Skeggia 12