Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving from HTML styling to CSS styling

Tags:

html

css

I currently have the following table definition:

<table border="1" cellspacing="0" bordercolor="#CEDFEF" cellpadding="1">

I am trying to transform it to CSS, using:

table{border:1px solid #CEDFEF;cellspacing = 0px;cellpadding = 1px}

The table doesn't render as it should, though. What am I doing wrong?

Secondarily, if I want to not apply this styling to one of my tables in specific, how do I do so?

like image 898
Night Walker Avatar asked Jul 01 '26 09:07

Night Walker


1 Answers

I expect problem is with cellpading and/or cellspacing. This is not valid CSS:

cellspacing = 0px;cellpadding = 1px

There are already some questions about that :

Set cellpadding and cellspacing in CSS?

Why are cellspacing and cellpadding not CSS styles

I hope this helps you.

like image 140
rkosegi Avatar answered Jul 03 '26 05:07

rkosegi