Jump to content

Topic on Extension talk:YouTube

Could be max-width=100% for mobile?

4
B.Shapoval (talkcontribs)

How to set maximum width in per cent for mobile view?

B.Shapoval (talkcontribs)

I found following solution (to MediaWiki:Mobile.css):

@media screen and (max-width: 750px) {
    iframe {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }
}

It works with images too, so no additional limitations needed.

Aafi (talkcontribs)

Doesn't appear to work in WMAU skin's mobile view? @Samwilson, do you happen to have any ideas?

Samwilson (talkcontribs)

@TheAafi: Setting iframe{ max-width:100%; <nowiki>}</nowiki> works in my testing. Possibly this is a change that the YouTube extension should make, rather than adding special handling in the WMAU skin.

Reply to "Could be max-width=100% for mobile?"