Cross-browser conflict at window width

Asked

Viewed 88 times

3

I’m working on a site, the problem is when the window is less than 500px, in Firefox the navbar (navBar.css) appears one way (correct) and in Chrome appears another. How to solve this?

inserir a descrição da imagem aqui

2 answers

2


Change that line:

#missValMob, #namesJobsMob, #middleTextMob {
    display: inline-block; /* estava display: block; */
}

This must have happened since the two browsers present differences in rendering, which, although minimal, generate some problems.

  • Or still some attribute has been recognized by Chrome changing the presentation of display causing the problem. Such attribute was not recognized by Firefox. I did not look at the rest of the code, I searched only the fault, I cannot confirm.

  • 1

    Very busy, it worked... I’ve researched but I didn’t buy very well the difference between "block" and "inline-block", you think you can explain it as if you were talking to a child sff?

  • ELI5? OK, I’ll edit the answer by explaining the difference between the two, but I don’t know if it applies to the case. It worked but it was by previous experiences, a kick.

  • While I’m editing the answer: your site has some elements with id equal, I recommend fixing it. This attribute should be unique per page.

  • I believe it has equal id’s for elements with the same formatting

  • I found out after all, bgado

  • Use classes in this case, classes you can have as many as you want, while ids are one per page.

Show 3 more comments

0

Apply these rules to your css, I believe it will work as intended:

@media only screen and (max-width: 800px)
#upBar {
    top: 0;
}
#wrapper > header {
    position: fixed;
    top: 0;
    z-index: 9;
}
  • It didn’t work, it’s the same... in Chrome the navbar seems to be dependent on the div "3 generations...", I don’t understand why

Browser other questions tagged

You are not signed in. Login or sign up in order to post.