Вниз
Скачать: 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.47 MB
Время: 0.026 c
3-1115112808
jiny
2005-05-03 13:33
2005.06.14
Куда делся QrDbChart ?


14-1117048305
Defunct
2005-05-25 23:11
2005.06.14
Просто треплюсь ;)


1-1116977878
Strech
2005-05-25 03:37
2005.06.14
Шифрование функций


14-1117158958
Просто Джо
2005-05-27 05:55
2005.06.14
Автомодератор озверел :)


9-1110792899
GLSceneFan
2005-03-14 12:34
2005.06.14
Важное объявление




   Наверх