Zubair Nazer Oliyat
Zubair Nazer Oliyat

Reputation: 165

media query for mobile showing different alignment in different mobile

i have a website done in html and css, I have used media query coz in mobile view one row in my website was showing wrong alignment, so id did the following code for mobile devices:

@media only screen and (max-width: 600px) {

#zayan {margin-left: -20%;}
#amir {margin-top: -20%; width: 100px;}
#amir h5 {font-size: 12px; margin-left: -40%;}


}

now I checked this in my redmi note 8 mobile and it was showing perfect, but when i checked it in my redmi 7 and another device its coming wrong,

can anyone please tell me what could be wrong here. thanks in advance

Upvotes: 0

Views: 60

Answers (1)

54ka
54ka

Reputation: 3589

I've tried it on my devices and I hope this works for you

@media all and (max-width: 600px) {

    #zayan {margin: auto; }
    #amir h5 { font-size: 12px; }
    #amir { margin-top: -20%; }

    .card-body{ padding: 0px !important; }

}

Upvotes: 1

Related Questions