Jump to content
  • 0

cellpadding, cellspacing в html5


cyklop77
 Share

Question

атрибуты таблицы cellpadding="0" cellspacing="0" не проходят html5-валидацию. подскажите пожалуйста чем можно заменить действие этих атрибутов?

сброс


table, tr, td{
border: none;
margin: 0;
outline: none;
padding: 0;
}

не помогает

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Замена cellspacing'а в CSS — border-spacing для table, cellpadding-а — padding для td. Поскольку border-spacing не работает в IE7-, до недавнего времени вместо border-spacing: 0 использовался border-collapse: collapse — это тоже убирает зазоры между ячейками, но с побочными эффектами (напр. перестает работать border-radius для ячеек), т.к. меняется вся модель построения таблицы.

  • Like 2
Link to comment
Share on other sites

  • 0

border-spacing тоже понимают все браузеры (кто не понимает — уже давно не браузер, а недоразуменIE). Зато border-spacing позволяет задавать разные отступы между столбцами и строками :)

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy