Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > validated html 5 table

Reply
Thread Tools

validated html 5 table

 
 
se
Guest
Posts: n/a
 
      12-02-2013

"Jonathan N. Little" <(E-Mail Removed)> skrev i meddelelsen
news:l7i44h$u2o$(E-Mail Removed)...
> Jonathan N. Little wrote:
>
>> backgrounds on TRs won't work.

>
> I'll correct myself, background WILL work on TR elements. It is when folks
> try to styles table rows via the TR for *borders* that fail. The OP markup
> failed to set row colors because of syntax errors.
>
>> /* set TR row background colors */
>> tr.red > * { background: #f00; }
>> tr.blue > * { background: #00f; }

>
> Therefore this will work...
>
> tr.red { background: #f00; }
> tr.blue { background: #00f; }
>
> ...and the other corrections still stand.
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIO
> http://www.LittleWorksStudio.com


Yes,
It was his quot typo at the end in this line here:
table {Border-collapse:collapse; text-align:center; margin:auto;"}

I falled in to this trap the same and therefore made some testes on his
code. Thereby discovered somting new I didn't know of.
<table border> as it stands without any width, works in all major browsers,
at least in newer ones. The browsers picks the width to be 1 pixel.

Discovered a flaw in FF 23.01 and the latest 25.01 that shows the
vertical colomn borders in different widths. No matter in what way
the borders are set, with/or without use of unit on the width. Whether
using style="....." or the old border:"1px". Wheter styling them in the
the <table> tag or directli in <td> tag. But, it only happens when using
a table header <th>. Updated FF to the latest version 25.01. Didn't
help. The other major browsers does not show this width-difference
in the vertical colomn borders.

Unless someone presents a solution to this, I'll consider it a flaw in FF
Could be none-exsisting on a linux-box. I'm on windows.

/se

 
Reply With Quote
 
 
 
 
se
Guest
Posts: n/a
 
      12-02-2013

"Denis McMahon" <(E-Mail Removed)> skrev i meddelelsen
news:l7huu4$std$(E-Mail Removed)...
> On Mon, 02 Dec 2013 03:30:17 -0500, richard wrote:
>
>> And I still can't understand why THIS is bad coding.
>> if ($a=1){echo "help!";}

>
> Because:
>
> $a=1;
> echo "help!";
>
> Is more readable, and readability of code is important when you're trying
> to remember, when someone suddenly removes a bunch of previously
> deprecated functions from a new release and you need to fix all your
> code, what you were trying to do.
>
> If I come across:
>
> if ($a=1) {echo "help!";}
>
> in someone elses code, or even in code I wrote 6 months ago, then unless
> I have a helpful comment I have to try and figure out which of the
> following possible meanings the coder intended:
>
> Choice 1, it was a weird way to write:
>
> // assign the value 1 to $a, then echo help
>
> $a=1;
> echo "help!";
>
> Choice 2, it was a typo for:
>
> // if $a has the value 1, echo help
>
> if ($a==1) {echo "help!";}
>
> --
> Denis McMahon, http://www.velocityreviews.com/forums/(E-Mail Removed)


Thank you;
for posting a polite answer to the forum.
I for my part has forgotten the case. Nothing more from here
about it.

/se

 
Reply With Quote
 
 
 
 
Evan Platt
Guest
Posts: n/a
 
      12-02-2013
On Sun, 1 Dec 2013 23:55:03 -0500, richard <(E-Mail Removed)>
wrote:

>Now that, is how you properly code a table.
>All text within the table is centered within a cell.
>the table will automatically center itself within it's container.
>The cells will be shown as 1 pixel wide in black with no whitespace between
>the cells.


You're giving HTML lessons now? Where can I sign up for your
introductory class, "How to write a basic website in just under 5
years with the help of hundreds of people from dozens of Usenet
Newsgroups?"
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      12-02-2013

"richard" <(E-Mail Removed)> skrev i meddelelsen
news:(E-Mail Removed)...
> On Mon, 02 Dec 2013 08:24:47 -0500, j wrote:
>
>> On 12/1/2013 11:55 PM, richard wrote:
>>> <!DOCTYPE HTML>

>>
>> a real life doctype is better.
>>>
>>> <html>
>>>
>>> <head>
>>>
>>> <title>Tables 101</title>

>>
>> It looks ugly to me. Not easily readable.
>>>
>>> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
>>> charset=windows-1252">
>>> <style type="text/css">
>>> table {Border-collapse:collapse; text-align:center; margin:auto;"}

>> ^^
>> double quote for no reason.
>>
>> Typically you see everything lowercase with a space after the colon, my
>> preference is like this:
>>
>> table {
>> border-collapse: collapse;
>> text-align: center;
>>
>> ... Often the CSS needs tweaking and it is easier to find when it isn't
>> one lined.
>>
>> Whether this is center aligned or not depends on the data. Not
>> everything reads better center aligned. Most data doesn't.
>>
>>
>>
>>> td, th {padding:10px;}
>>> .red {background:#f00;}
>>> .blue {background:#00f;}
>>> </style>
>>>
>>> </head>
>>> <body>
>>>
>>> <table border="1">

>>
>> I tend not to use an attribute but put the border in the stylesheet.
>> When you are tinkering with styling it is nice to just tinker with the
>> stylesheet and not have to go in and tinker with the html also.
>>
>> And a tbody would be nice and perhaps a thead.
>>
>>> <tr class="red"><th>One</th><th>Two</th><th>Three</th></tr>

>>
>> Something like this may be easier to read:
>> <tr class="red">
>> <th>....
>>
>>> <tr><td>A</td><td></td><td></td></tr>
>>> <tr><td>B</td><td></td><td></td></tr>
>>> <tr class="blue"><td>C</td><td></td><td></td></tr>

>>
>> When you put content in cells the lines can get really long and having
>> some whitespace and indentation helps find your place.
>>> </table>
>>>
>>> </body>
>>> </html>
>>>
>>> Now that, is how you properly code a table.

>>
>> Not really. If you are going to set yourself up as an example, make it
>> look right. What you do in your own html is another matter.
>>
>> HTML/CSS often needs adjusting at some point. One lined html and css is
>> not so easy to locate and read. Don't push that as "proper". What you
>> have is more or less OK, but it should be no ones example of proper.
>>
>> Jeff
>>
>>
>>> All text within the table is centered within a cell.
>>> the table will automatically center itself within it's container.
>>> The cells will be shown as 1 pixel wide in black with no whitespace
>>> between
>>> the cells.
>>>

>
> The doctype is correct!
> Learn the declaration for html5.
>
> My purpose here is to show how tables should be handled with css.
> How you code your stuff is your business.
>
> There is a purpose for thead and tbody.
> Obviously you not know that.


You're asking for raps, boy.

/se

 
Reply With Quote
 
Denis McMahon
Guest
Posts: n/a
 
      12-02-2013
On Mon, 02 Dec 2013 08:40:53 -0800, Evan Platt wrote:

> On Sun, 1 Dec 2013 23:55:03 -0500, richard <(E-Mail Removed)> wrote:


>>Now that, is how you properly code a table.


> You're giving HTML lessons now? Where can I sign up for your
> introductory class, "How to write a basic website in just under 5 years
> with the help of hundreds of people from dozens of Usenet Newsgroups?"


Evan, you got the class name wrong: s /basic/broken/

--
Denis McMahon, (E-Mail Removed)
 
Reply With Quote
 
Evan Platt
Guest
Posts: n/a
 
      12-03-2013
On Mon, 2 Dec 2013 17:23:25 +0000 (UTC), Denis McMahon
<(E-Mail Removed)> wrote:

>Evan, you got the class name wrong: s /basic/broken/


Good point.

We should take wagers - what will bullis finish first, his dome home,
or his website?
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.
 
Reply With Quote
 
j
Guest
Posts: n/a
 
      12-03-2013
On 12/3/2013 1:26 AM, Evan Platt wrote:
> On Mon, 2 Dec 2013 17:23:25 +0000 (UTC), Denis McMahon
> <(E-Mail Removed)> wrote:
>
>> Evan, you got the class name wrong: s /basic/broken/

>
> Good point.
>
> We should take wagers - what will bullis finish first, his dome home,
> or his website?
>

It's a shame richard has turned out to be such a dick. I'd be interested
in the Dome home, having known two people who have built them. One of
which is on the back cover of "Woodstock Handmade Houses".

Life has pretty much moved on from domes. They create more problems than
they solve. Maybe that explains richard...

Jeff
 
Reply With Quote
 
Tim Streater
Guest
Posts: n/a
 
      12-03-2013
In article <l7l9rl$k0o$(E-Mail Removed)>, <(E-Mail Removed)> wrote:

> On 12/3/2013 1:26 AM, Evan Platt wrote:
> > On Mon, 2 Dec 2013 17:23:25 +0000 (UTC), Denis McMahon
> > <(E-Mail Removed)> wrote:
> >
> >> Evan, you got the class name wrong: s /basic/broken/

> >
> > Good point.
> >
> > We should take wagers - what will bullis finish first, his dome home,
> > or his website?
> >

> It's a shame richard has turned out to be such a dick.


All richards are dicks, by definition.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      12-04-2013
richard <(E-Mail Removed)> wrote in news:14n99wa0uvq6y$.sf90bgnbrqil.dlg@
40tude.net:

> And I still can't understand why THIS is bad coding.
> if ($a=1){echo "help!";}


It's bad coding because = is the *assignment* operator in PHP, not the test-for-equality
operator.

*I* still can't understand why you continue to make that error, after having been corrected so
many times.
 
Reply With Quote
 
j
Guest
Posts: n/a
 
      12-04-2013
On 12/2/2013 12:01 PM, se wrote:
>
> "richard" <(E-Mail Removed)> skrev i meddelelsen
> news:(E-Mail Removed)...
>> On Mon, 02 Dec 2013 08:24:47 -0500, j wrote:
>>
>>> On 12/1/2013 11:55 PM, richard wrote:
>>>> <!DOCTYPE HTML>
>>>
>>> a real life doctype is better.
>>>>
>>>> <html>
>>>>
>>>> <head>
>>>>
>>>> <title>Tables 101</title>
>>>
>>> It looks ugly to me. Not easily readable.
>>>>
>>>> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
>>>> charset=windows-1252">
>>>> <style type="text/css">
>>>> table {Border-collapse:collapse; text-align:center; margin:auto;"}
>>> ^^
>>>
>>> double quote for no reason.
>>>
>>> Typically you see everything lowercase with a space after the colon, my
>>> preference is like this:
>>>
>>> table {
>>> border-collapse: collapse;
>>> text-align: center;
>>>
>>> ... Often the CSS needs tweaking and it is easier to find when it isn't
>>> one lined.
>>>
>>> Whether this is center aligned or not depends on the data. Not
>>> everything reads better center aligned. Most data doesn't.
>>>
>>>
>>>
>>>> td, th {padding:10px;}
>>>> .red {background:#f00;}
>>>> .blue {background:#00f;}
>>>> </style>
>>>>
>>>> </head>
>>>> <body>
>>>>
>>>> <table border="1">
>>>
>>> I tend not to use an attribute but put the border in the stylesheet.
>>> When you are tinkering with styling it is nice to just tinker with the
>>> stylesheet and not have to go in and tinker with the html also.
>>>
>>> And a tbody would be nice and perhaps a thead.
>>>
>>>> <tr class="red"><th>One</th><th>Two</th><th>Three</th></tr>
>>>
>>> Something like this may be easier to read:
>>> <tr class="red">
>>> <th>....
>>>
>>>> <tr><td>A</td><td></td><td></td></tr>
>>>> <tr><td>B</td><td></td><td></td></tr>
>>>> <tr class="blue"><td>C</td><td></td><td></td></tr>
>>>
>>> When you put content in cells the lines can get really long and having
>>> some whitespace and indentation helps find your place.
>>>> </table>
>>>>
>>>> </body>
>>>> </html>
>>>>
>>>> Now that, is how you properly code a table.
>>>
>>> Not really. If you are going to set yourself up as an example, make it
>>> look right. What you do in your own html is another matter.
>>>
>>> HTML/CSS often needs adjusting at some point. One lined html and css is
>>> not so easy to locate and read. Don't push that as "proper". What you
>>> have is more or less OK, but it should be no ones example of proper.
>>>
>>> Jeff
>>>
>>>
>>>> All text within the table is centered within a cell.
>>>> the table will automatically center itself within it's container.
>>>> The cells will be shown as 1 pixel wide in black with no whitespace
>>>> between
>>>> the cells.
>>>>

>>
>> The doctype is correct!
>> Learn the declaration for html5.
>>
>> My purpose here is to show how tables should be handled with css.
>> How you code your stuff is your business.
>>
>> There is a purpose for thead and tbody.
>> Obviously you not know that.

>
> You're asking for raps, boy.
>
> /se


Indeed. But he does such a good job of taking himself down that it is
superfluous.

Jeff
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Client Destroys My Validated HTML Raymond SCHMIT HTML 5 08-02-2008 11:11 PM
Re: Client Destroys My Validated HTML Travis Newbury HTML 1 07-31-2008 03:56 PM
Re: Client Destroys My Validated HTML Adrienne Boswell HTML 0 07-31-2008 02:27 PM
ASP.net validation controls don't are not validated(fired) on the client side. mallik ASP .Net 3 07-07-2005 08:42 AM
dynamically created control is not being validated DesignerX ASP .Net 2 07-24-2003 04:47 PM



Advertisments