question about tables in html

7 réponses [Dernière contribution]
muhammed
Hors ligne
A rejoint: 04/13/2013

I am learning some basic html, could you help me out? I'm using this jxself.org page as a template to learn: http://jxself.org/linux-libre/

If I set a table border to 0 in my html page, the border still shows. Is the CSS sheet overriding my html page border-setting? I'm having similar difficulty with the border color.

I attached my html and css pages if it helps to look at.

muhammed
Hors ligne
A rejoint: 04/13/2013

Here are the files

Pièce jointeTaille
practice.tar 14.5 Ko
t3g
t3g
Hors ligne
A rejoint: 05/15/2011

Why are you using tables in 2015? Jump to the 21st century and use DIVs instead.

rakyi
Hors ligne
A rejoint: 05/09/2014

As t3g said, tables should be used for tables not general layout. The CSS sheet is indeed overriding your HTML, look at the line 46. For most cases its also better to use CSS in separate file(s) for all styling.

jbar
Hors ligne
A rejoint: 01/22/2011

It's not a table border what you see in that html, but a td border.

As rakyi said, is in line 46


th, td {
border: 1px solid #000;
padding: 0.5em;
}

quantumgravity
Hors ligne
A rejoint: 04/22/2013

http://csszengarden.com/

Old page and more for the sake of demonstration, but i like it very much.
Go css all the way, it's so much better than tables.

Ps.: just browse "all designs"

muhammed
Hors ligne
A rejoint: 04/13/2013

thanks guys

"div" is next on my list of things to learn, and I will read the zengarden page too

jbar
Hors ligne
A rejoint: 01/22/2011

These are some resources I like:

Mozilla Developer Network, tutorials on different web technologies: HTML, CSS, JavaScript, etc. https://developer.mozilla.org/en-US/

Alistapart http://alistapart.com/, very good articles, like this on float property http://alistapart.com/article/css-floats-101