Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Beginer <TABLE BORDER="1"> Question..?

Reply
Thread Tools

Beginer <TABLE BORDER="1"> Question..?

 
 
Robert Bralic
Guest
Posts: n/a
 
      11-29-2013
Dear Gentelmans,

How to make a borders for cels that are empty...
When I writte a <Table border="1"> tag, the borders
for cels that are empty is not showd..

Thanks in advance, Robert..


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-29-2013
2013-11-29 8:33, Robert Bralic kirjoitti:

> How to make a borders for cels that are empty...
> When I writte a <Table border="1"> tag, the borders
> for cels that are empty is not showd..


Short answer: Put useful content in the cell. In most cases, this is easy.

Failing that, put useless content there: <td>&nbsp;</td>. If this makes
the cell too big, then (you have an odd table, and) put an <img> element
there, referring to a single-pixel transparent GIF.

Long answer: http://www.cs.tut.fi/~jkorpela/html/emptycells.html

But is this really a problem? I think IE 7 is (was) the last browser
that does not draw borders around empty cells. People who use IE 7 or
older (probably about 2% of your visitor) cannot expect visually good
browsing experience anyway, and some missing borders shouldn't be a big
issue.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
 
Reply With Quote
 
 
 
 
se
Guest
Posts: n/a
 
      11-29-2013

"Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
news:l79cgj$dqq$(E-Mail Removed)-com.hr...
> Dear Gentelmans,
>
> How to make a borders for cels that are empty...
> When I writte a <Table border="1"> tag, the borders
> for cels that are empty is not showd..
>
> Thanks in advance, Robert..
>


Have you tried using a unit on the border-width "1" like so 1px
Try this: <table style="border: 1px black solid;">
Or if not black then another border-color.

 
Reply With Quote
 
Robert Bralic
Guest
Posts: n/a
 
      11-29-2013

"se" <(E-Mail Removed)> wrote in message news:l79l0m$rja$(E-Mail Removed)...
>
> "Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
> news:l79cgj$dqq$(E-Mail Removed)-com.hr...
>> Dear Gentelmans,
>>
>> How to make a borders for cels that are empty...
>> When I writte a <Table border="1"> tag, the borders
>> for cels that are empty is not showd..
>>
>> Thanks in advance, Robert..
>>

>
> Have you tried using a unit on the border-width "1" like so 1px
> Try this: <table style="border: 1px black solid;">
> Or if not black then another border-color.


Thank you very much, but this makes a frame around table,
not in cells...
If you know ..?..

Thanks Robert..


 
Reply With Quote
 
se
Guest
Posts: n/a
 
      11-29-2013

"Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
news:l79qo1$mp1$(E-Mail Removed)-com.hr...
>
> "se" <(E-Mail Removed)> wrote in message news:l79l0m$rja$(E-Mail Removed)...
>>
>> "Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
>> news:l79cgj$dqq$(E-Mail Removed)-com.hr...
>>> Dear Gentelmans,
>>>
>>> How to make a borders for cels that are empty...
>>> When I writte a <Table border="1"> tag, the borders
>>> for cels that are empty is not showd..
>>>
>>> Thanks in advance, Robert..
>>>

>>
>> Have you tried using a unit on the border-width "1" like so 1px
>> Try this: <table style="border: 1px black solid;">
>> Or if not black then another border-color.

>
> Thank you very much, but this makes a frame around table,
> not in cells...
> If you know ..?..
>
> Thanks Robert..


Well,
Then set the borders on the cells
<table id="table1">
<tr>
<td style="border: 1px black solid; border-collapse:collapse;" >....</td>
<td style="border: 1px black solid; border-collapse:collapse">....</td>
</tr>
</table>

But instead of all this, place this in your documents head:

<style type="text/css">
#table1 td {border: 1px black solid; border-collapse:collapse;}
</style>

Now you don't need to have it in any of the table td 's.
Use www.w3schools.com learning webdesign.



 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-29-2013
2013-11-29 13:45, se wrote:

> Then set the borders on the cells
> <table id="table1">
> <tr>
> <td style="border: 1px black solid; border-collapse:collapse;" >....</td>
> <td style="border: 1px black solid; border-collapse:collapse">....</td>
> </tr>
> </table>


The issue was that empty cells do not have borders (in some ancient
browsers, really), and the above does not help with that.

> But instead of all this, place this in your documents head:
>
> <style type="text/css">
> #table1 td {border: 1px black solid; border-collapse:collapse;}
> </style>


The border-collapse property does not affect a td element. Did you
actually test your advice before posting it=

> Use www.w3schools.com learning webdesign.


That's probably the worst site to learn web design; see
http://www.w3fools.com

Note that correct answers to the problem have already been posted.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      11-29-2013

"Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
news:l79qo1$mp1$(E-Mail Removed)-com.hr...
>
> "se" <(E-Mail Removed)> wrote in message news:l79l0m$rja$(E-Mail Removed)...
>>
>> "Robert Bralic" <(E-Mail Removed)-com.hr> skrev i meddelelsen
>> news:l79cgj$dqq$(E-Mail Removed)-com.hr...
>>> Dear Gentelmans,
>>>
>>> How to make a borders for cels that are empty...
>>> When I writte a <Table border="1"> tag, the borders
>>> for cels that are empty is not showd..
>>>
>>> Thanks in advance, Robert..
>>>

>>
>> Have you tried using a unit on the border-width "1" like so 1px
>> Try this: <table style="border: 1px black solid;">
>> Or if not black then another border-color.

>
> Thank you very much, but this makes a frame around table,
> not in cells...
> If you know ..?..
>
> Thanks Robert..


border-collapse: collapse;
Does not work on cells. I just copied this string from a table into the
cells,
and was not attentive.
The collapse rule is used to collapse ajacent table-borders.
If you want border-collapsing on ajacent cells, cell-border-widths
must be ruled differently on them (one having value 0, the other
having a value). These rules can be written in different ways.

It is a safe-guard to append "border: 1" with a unit for the width.
And to write it in full as: border: 1px black solid;

I recommend anyone learning webdesign from www.w3schools.com

/se





 
Reply With Quote
 
se
Guest
Posts: n/a
 
      11-29-2013

"Beauregard T. Shagnasty" <(E-Mail Removed)> skrev i meddelelsen
news:l7ah7r$ftr$(E-Mail Removed)...
> se wrote:
>
>> I recommend anyone learning webdesign from www .w3schools .com

>
> You shouldn't. Unless ... to your competitors. <lorf!>



Se on jigsaw.validator what your -competitor / w3fools.com - kan do for you.
They have it in the mouth - a kind of "lorf".
Their domain-name "w3fools.com" matching their writings,
reminds me of the technique used by a handfull of participators
here on this forum, and on the comp.lang.javascript forum.
No suprise, if Jukka and Pointed Ears could be found on the
list at www.w3fools.com
http://jigsaw.w3.org/css-validator/v...rning=&lang=en


>
> http://www.w3fools.com/
>
> --
> -bts
> -This space for rent, but the price is high


 
Reply With Quote
 
Christoph Michael Becker
Guest
Posts: n/a
 
      11-29-2013
se wrote:

> It is a safe-guard to append "border: 1" with a unit for the width.


It is not a safe-guard, but required, if I'm not mistaken.

> And to write it in full as: border: 1px black solid;
>
> I recommend anyone learning webdesign from www.w3schools.com


E.g. <http://w3schools.com/css/css_border.asp>:

| The border-width property is used to set the width of the border.

| The width is set in pixels, or by using one of the three pre-defined
^^^^^^
| values: thin, medium, or thick.

Compare that to the "standard"[1], and you may see, why w3schools is not
the best place to learn webdesign.

[1] <http://www.w3.org/TR/CSS2/box.html#border-width-properties>

--
Christoph M. Becker
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      11-29-2013

"Christoph Michael Becker" <(E-Mail Removed)> skrev i meddelelsen
news:5298ee57$0$6633$(E-Mail Removed)-online.net...
> se wrote:
>
>> It is a safe-guard to append "border: 1" with a unit for the width.

>
> It is not a safe-guard, but required, if I'm not mistaken.


That's also what I assume.
Don't care with w3fools

> <http://www.w3.org/TR/CSS2/box.html#border-width-properties>
>
> --
> Christoph M. Becker


 
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
a = [ "1", "2", "3" ] v/s a = new Array ( "1", "2", "3" )identical in all ways? okey Javascript 1 08-25-2009 12:56 PM
border-color: #003366; border-width: 2px; =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 64 07-30-2006 04:01 PM
Drop Down List Border Width vs Text Box Border Width Coder ASP .Net 1 06-24-2006 01:27 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM



Advertisments