Вниз
Скачать: CL | DM;

Вопрос по CSS   Найти похожие ветки 

← →
DiamondShark ©   (2005-05-23 13:21) [0]

Имеем таблицу:
<TABLE cellspacing="1">

Есть ли, и какой аналог атрибута cellspacing в CSS?


← →
vidiv ©   (2005-05-23 13:32) [1]

td {margin:xx}
наверное так


← →
Gero ©   (2005-05-23 14:45) [2]

padding


← →
DiamondShark ©   (2005-05-23 14:55) [3]

padding -- это интервал от внутреннего края до содержимого.
margin -- вообще никакого эффекта.


← →
Jeer ©   (2005-05-23 15:10) [4]

DiamondShark ©   (23.05.05 14:55) [3]
>padding -- это интервал от внутреннего края до содержимого.

Нет, это интервал до родительского объекта.
Для TD родителем является TABLE, поэтому этот вариант подойдет.
Но вообще-то в CSS2 так и звучит
table { cell-spacing: x, y; }

можно задавать отдельно по x,y.


← →
Gero ©   (2005-05-23 15:24) [5]


> DiamondShark ©   (23.05.05 14:55)

Сорри, мне показалось, что cellpadding.
Тогда AFAIK, никак.


← →
DiamondShark ©   (2005-05-23 15:25) [6]


> Нет, это интервал до родительского объекта.

Они (http://www.w3.org/TR/CSS1#formatting-model http://www.w3.org/TR/CSS21/box.html) другого мнения.

Да глазам я верю.


> Но вообще-то в CSS2 так и звучит
> table { cell-spacing: x, y; }

Нет такой буквы.


← →
DiamondShark ©   (2005-05-23 15:37) [7]

Ну что за жизнь... Всё приходится самому искать.

Атрибут на зывается border-spacing (http://www.w3.org/TR/CSS21/tables.html#propdef-border-spacing).

Вот только IE, сволочь, его не поддерживает. NN 7.0 поддерживает.


← →
Иксик ©   (2005-05-23 15:58) [8]


> DiamondShark ©   (23.05.05 15:37) [7]

Только хотел написать :)


← →
Jeer ©   (2005-05-23 16:09) [9]

Значит было:)

The property "cell-spacing" selects the model:

"cell-spacing"

Property name:   "cell-spacing"
Value:   none | <length> <length>? | inherit
Initial:   none
Applies to:   table
Inherited:   yes
Percentage values:   N/A
Media groups:   visual

The "cell-spacing" property only applies to elements with "display: table".

If the value is a length, that amount of space is kept open between the borders of all cells. It may not be negative. The space is filled with the background of the table element.

If there are two length values, the first one is the horizontal spacing, and the second one is the vertical spacing. If there is just one length value, it gives both the horizontal and vertical spacing.

Each cell has its own borders, and the overall width of the table is the sum of the cells, plus the cell-spacing between all borders (see figure 3).

Только и его IE не поддерживал.:)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.032 c
1-1117184647
Layner
2005-05-27 13:04
2005.06.14
Приветствую всех! Простой вопрос по написанию компанента


1-1117011502
KSK
2005-05-25 12:58
2005.06.14
кнопки SpeedButton


6-1111439002
Zion
2005-03-22 00:03
2005.06.14
Как узнать IP-адрес компа в локалке по его сетевому имени?


14-1116714977
лак
2005-05-22 02:36
2005.06.14
Разреженный вектор


14-1116872401
gn
2005-05-23 22:20
2005.06.14
фото альбом




   Наверх