Jump to content
покупайте без комиссии
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

карта яндекс сделать адаптивной


Recommended Posts

Добрый день друзья

Для каждого товара у меня своя карта

код карты:

 <?php if ($location) { ?>               
  <div id="product" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 
 <script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=<?php echo $location; ?>;width=510&amp;height=380&amp;lang=ru_RU&amp;scroll=true"></script>
  </div>
  </br> 
  <?php } ?>  

На странице отображается нормально, а вот на смартфоне не очень. Как это поправить?

Link to post
Share on other sites

width=100%25&amp;height=400&amp;

 

помещаете в контейнер и задаете ширину.

 

p.s. только использовать только один id

p.s.s. ну и микроразметка...

p.s.s.s. да и br после div хз зачем

Edited by n3bo
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.