Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] CSS on main element not working for iPhone

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #150831
    Willem-Siebe
    Participant

    Hi,

    On my website I added the main element and did some CSS on it. However, interesting is that there are no problems, except for the iPhone browsers (standard, google chrome).

    On Samsung only the standard browser has the same behaviour, others like Chrome and Firefox do listen to the CSS.

    Others experiencing the same?

    Kind regards,

    Willem

    #150835
    Paulie_D
    Member

    What issues are you actually having?

    #150848
    Senff
    Participant

    It looks like Safari iOS (as well as Chrome iOS) are treating the <main> element as an inline element, whereas other browsers treat it as a block-level element: http://codepen.io/senff/pen/CvKxA

    #150890
    Willem-Siebe
    Participant

    Ok, so you experience the same issues, thanks for testing. Any idea what I should do with this problem and should I send those browser an e-mail? Treat it as a block-level element makes more sense…

    Kind regards,

    Willem

    #151079
    Willem-Siebe
    Participant

    Yes, that’s the solution thanks. The html5shiv.js is already updated, but that only solves the problem for IE10 which also treats this main element as inline element. So I use html5shiv.js only for IE8 and lower, for the rest, also for the mobile browsers I was talking about, the display:block works perfect.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.