简体   繁体   中英

Mobile site different after integrating Joomla! cms

I am currently creating a website. I made the first initial prototype static but just integrated a Joomla! cms into it. (links removed)

Initially the device width (on my nexus 5 in portrait) comes out at 360, but with the cms integrated the device width comes out at 980 - so the css media queries aren't correct

Is there any Joomla! inserted script that could affect this or could it be the way php pulls files at different times?

Here's the css:

@media (max-width: 991px) {
  .topnavitem:hover,
  .subnav_item:hover {
    background-color: inherit;
  }
  .long {
    box-shadow: black 0px 4px 10px -2px;
  }
  .footer {
    box-shadow: black 0px -1px 3px 0px, white 0px 0px 6px 0px;
  }
  .sliderimage.teamphotosliderimage {
    margin-top: 0px;
  }
  .sliderimage.varistyimg {
    margin-top: -24px;
  }
  .topnavitem {
    position: static;
    max-width: 100%;
    margin-left: 0px;
    padding-left: 40px;
    float: none;
  }
  .topnavitem.w--current {
    max-width: 100%;
    padding-right: 0px;
    float: none;
  }
  .topnavitem.nodropdown {
    position: relative;
    max-width: 100%;
    margin-left: 0px;
    padding-right: 0px;
    padding-left: 40px;
    float: none;
  }
  .navmenu {
    position: absolute;
    background-color: #4d1c1c;
  }
  .menubutton.w--open {
    background-color: #4d1c1c;
  }
  .navblock {
    display: block;
    margin-left: 0px;
    padding-left: 0px;
    float: none;
  }
  .subnavsection {
    position: static;
    text-align: left;
  }
}
@media (max-width: 767px) {
  .long {
    box-shadow: black 0px 4px 10px -2px;
  }
  .sliderimage.varistyimg {
    margin-top: 0px;
  }
  .slider {
    height: 250px;
  }
  .sidelinksimage {
    width: 120px;
    height: 120px;
    margin-right: 5px;
    margin-left: 5px;
  }
}
@media (max-width: 479px) {
  .long {
    box-shadow: black 0px 4px 10px -2px;
  }
  .sliderimage.teamphotosliderimage {
    margin-top: 0px;
  }
  .sliderimage.varistyimg {
    margin-top: -16px;
  }
  .slider {
    height: 120px;
  }
  .sidelinksimage {
    width: 65px;
    height: 65px;
    margin-right: 5px;
    margin-left: 5px;
  }
  .menubutton.w--open {
    background-color: #4d1c1c;
  }
  .gallery_image {
    width: 21%;
  }
}

有趣的是,此设置可以解决此问题:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM