Вниз
Скачать: 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.025 c
14-1116913099
cyborg
2005-05-24 09:38
2005.06.14
25 фактов о Звездных войнах


14-1117095750
Игорь Шевченко
2005-05-26 12:22
2005.06.14
Восстановление ветки "Двойные стандарты"


3-1115720609
GreatMaster
2005-05-10 14:23
2005.06.14
Так как через ADO общаться с DBF в кодировке 1251?


14-1116841043
Polevi
2005-05-23 13:37
2005.06.14
Нас облучают !


1-1117167035
Andurbay
2005-05-27 08:10
2005.06.14
Перезапуск формы




   Наверх