Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <section class="section">
  <div class="container">
    <div style="background: #f1accc;" class="block">
      <div class="text-block">
        <h2>Lorem ipsum.</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis sequi nam temporibus quibusdam possimus repudiandae veritatis, in autem! Repellat maiores quia neque aspernatur libero consequatur quod provident, explicabo voluptatum dolor!</p>
    <div class="block map">
      <div id="map"></div>

<section style="background: #fff;">
  <div class="container">
    <div style="background: #f0f;" class="block"></div>
    <div style="background: #f01;" class="block"></div>


                * {
  box-sizing: border-box;

section {
  background: #444000;

.container {
  width: 80%;
  margin: 0 auto;
  padding: 10px 0;
  border: 1px solid red;
  display: flex;
  flex-wrap: wrap;

.block {
  position: relative;
 height: 250px;
  width: 50%;

.text-block {
  padding: 20px;
  // border: 1px solid #f0f;

.map {
  right: 0;
  margin-left: -100%;
  position: absolute;
  background: aquamarine;

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

@media screen and (max-width: 750px) {
  .block {
    width: 100%;
  .map {
    position: relative;
    margin-left: auto;



        function init () {
        	var myMap = new ymaps.Map("map", {
        		center: [50.436179, 30.5230],
        		zoom: 18,
//Скрыть элементы управления: controls: []
						controls: []
        	}, {
        		searchControlProvider: 'yandex#search'
	        	//Media Queries

        		if (window.matchMedia("(max-width: 1500px)").matches) {
        			myMap.setCenter([50.436179, 30.5215])
        		if (window.matchMedia("(max-width: 992px)").matches) {
        			myMap.setCenter([50.436179, 30.5218])
        		if (window.matchMedia("(max-width: 767px)").matches) {
        			myMap.setCenter([50.436179, 30.5200])

    // Создаем геообъект с типом геометрии "Точка".
    myGeoObject = new ymaps.GeoObject({
            // Описание геометрии.
            geometry: {
            	type: "Point",
            	coordinates: [50.4361, 30.5199]
            // Свойства.
            properties: {
                // Контент метки.
                iconContent: 'Lorem',
                hintContent: 'Компания "Lorem"'
            }, {
            // Опции.
            // Иконка метки будет растягиваться под размер ее содержимого.
            preset: 'islands#blackStretchyIcon',
            // Метку можно перемещать.
            draggable: false,
            // Необходимо указать данный тип макета.
            //iconLayout: 'default#image',
						 // Своё изображение иконки метки.
            //iconImageHref: 'img/pin.png',
            // Размеры метки.
            //iconImageSize: [74, 99],
            // Смещение левого верхнего угла иконки относительно
            // её "ножки" (точки привязки).
            //iconImageOffset: [-7, -110]

        // Отключаем часть включенных по умолчанию поведений:
        //  - drag - перемещение карты при нажатой левой кнопки мыши;
        //  - magnifier.rightButton - увеличение области, выделенной правой кнопкой мыши.