Leonid H

Рейтинг
89
Регистрация
26.09.2013

Все очень просто. Горизонтальной полосы нету, потому что сайт у вас отображается на весь экран мобильного. Приходится пальцами зумировать.

С шрифтом беда, потому что в пикселях указан.

Staid:
foreach ($x as $key => $value){
if($key == 5){
unset($x[$key]);
}
}

---------- Добавлено 05.02.2016 в 21:08 ----------

foreach ($x as $key => $arr){
if($arr['color'] == 55){
unset($x[$key]);
}
}

Спасибо!

А это особенность json строк?

Было:

[{"id":"3","color":"20","quantity":"13"},{"id":"1","color":"613","quantity":"18"},{"id":"2","color":"27H","quantity":"13"},{"id":"1","color":"27H","quantity":"33"}]

После того как удалил массив, стало:

{"0":{"id":"3","color":"20","quantity":"13"},"2":{"id":"2","color":"27H","quantity":"13"},"3":{"id":"1","color":"27H","quantity":"33"}}

То есть вначале новых массивов появились {"0",.. "2",.. "3"..

Это номер массива? Я правильно понимаю? )

Зато потом если добавляю новый массив, эти номера пропадают.

Veterok2009:
Я чуть не верно первый раз написал) там +3 нужно. +1 учитывает и первый элемент.
Или можно просто .item:nth-of-type(3n)

У меня назрел вопрос. А если делать резиновый сайт, и тянуть за уголок браузера, логично предположить что 3 блок станет вторым или если расширяем - четвертым, то выходит уже nth:of-type не отделаешься. Верно?

Как быть в этом случае?? : D

@media ? )

А чего это всех на якоря потянуло? :D

Veterok2009:
.item:last-of-type будет применяться только к последнему элементу. То есть в случае ТС (интернет магазин, где явно больше 3-х товаров) не нужен
Скорее нужен .item:nth-of-type(3n+1) - выберется каждый 3-й элемент

Спасибо за инфу )

Yurecm:
Если задается верстка только одного товара, как лучше сверстать, чтобы справа от последнего товара не было отступа, сейчас у каждого указан margin-right:10px; для задания промежутка между товарами. Как убрать у последнего отступ справа, если конкретно последний править нет возможности, только все сразу.

Надеюсь получилось объяснить, вот картинка



Заранее спасибо, плюсом :)

PS да и по высоте в идеале чтобы они все одинаковые были)) спасибо!

.class_name:last-of-type {margin-right: none;}

eN_Slon:

2. Где лучше хранить картинки

В папке images?

У вас все идет сплошняком - стили не подключены.

Проверьте имя и путь до стилевого файла.

<head>

<link rel="stylesheet" href="style.css">

</head>

<style>

.grid:after {

content: " ";

display: table;

clear: both;

}

[class*='col-'] {

float: left;

}

*, *:after, *:before {

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

.col-1 {width: 8.33333333%;}

.col-2 {width: 16.66666667%;}

.col-3 {width: 25%;}

.col-4 {width: 33.33333333%;}

.col-5 {width: 41.66666667%;}

.col-6 {width: 50%;}

.col-7 {width: 58.33333333%;}

.col-8 {width: 66.66666667%;}

.col-9 {width: 75%;}

.col-10 {width: 83.33333333%;}

.col-11 {width: 91.66666667%;}

.col-12 {width: 100%;}

.block_one {background-color: red;}

.block_two {background-color: blue;}

.block_three {background-color: green;}

</style>

<div class="container">

<div class="grid">

<div class="col-9">

<div class="block_one">

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

</div>

<div class="block_two">

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

</div>

<div class="block_three">

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

</div>

</div>

<div class="col-3">

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo

consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse

cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non

proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

</div>

</div>

</div>

Gerga:
Leonid H, можно. Для body overflow-y: hidden; , а для модально окна фиксированная высота и overflow-y: scroll;

А как менять свойство в <body> при клике по ссылке?

Всего: 141