S
S
Svyatoslav Khusamov2020-03-10 16:48:01
Yandex maps
Svyatoslav Khusamov, 2020-03-10 16:48:01

How to embed a Yandex map on flex?

How to embed a Yandex map on flex?

I tried to do this, but when changing the width of the browser - the width of the map only increases (horizontal scrolling appears).

https://jsfiddle.net/khusamov/91ownd3j/31/

html {
  width: 100%;
  height: 100%;
  display: flex;
}


body {
  padding: 0;
  margin: 0;
  display: flex;
  flex: 1 1 0;
}

#map-wrap {
  display: flex;
  flex: 1 1 0;
}

#map-block {
  display: flex;
  flex: 1 1 0;
}

#map-settings {
  width: 300px;
}

#map {
  width: 100%;
  height: 100%;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Svyatoslav Khusamov, 2020-03-10
@khusamov

https://jsfiddle.net/khusamov/91ownd3j/43/

html {
      width: 100%;
      height: 100%;
      display: flex;
    }
    
    
    body {
      padding: 0;
      margin: 0;
      display: flex;
      flex: 1 1 0;
    }
    
    #map-wrap {
      display: flex;
      flex: 1 1 0;
    }
    
    #map-block {
      flex: 1 1 0;
      position: relative;
    }
    
    #map-settings {
      width: 300px;
    }
    
    #map {
      position: absolute;
      width: 100%;
      height: 100%;
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question