Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Replacing tables with divs

Reply
Thread Tools

Re: Replacing tables with divs

 
 
richard
Guest
Posts: n/a
 
      03-08-2012
On Thu, 8 Mar 2012 00:18:16 +0100, Alfred Molon wrote:

> There is probably a simple answer to this, but for some reason I haven't
> figured it out yet.
>
> 1. How do I replace a table with three columns with an equivalent div-
> based code?
>
> From:
> <table>
> <tr><td></td><td></td><td></td></tr>
> </table>
>
> to:
> <div>
> <div id="div1"></div><div id="div2"></div><div id="div3"></div>
> </div>
>
> 2. Same question for a table with three rows:
>
> From:
> <table>
> <tr><td></td></tr>
> <tr><td></td></tr>
> <tr><td></td></tr>
> </table>
>
> to an equivalent code with divs.
>
> Should be easily possible with CSS based on what I understood.


Use <ul> instead.

<ul style="Display:inline;">
<li></li><li></li></li>
</ul>

This would cause columns to be shown.
For a new row, just duplicate the three lines.

For a single column just <div>. Each new division creates the new row
without styling.
 
Reply With Quote
 
 
 
 
Doug Miller
Guest
Posts: n/a
 
      03-08-2012
richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
40tude.net:

> Use <ul> instead.
>
> <ul style="Display:inline;">
> <li></li><li></li></li>
> </ul>
>
> This would cause columns to be shown.


No, it doesn't. Did you test this before you posted, RtD?
 
Reply With Quote
 
 
 
 
idle
Guest
Posts: n/a
 
      03-08-2012
On Thu, 8 Mar 2012 11:35:44 +0000 (UTC), Doug Miller wrote in alt.html:

> richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
> 40tude.net:
>
>> Use <ul> instead.
>>
>> <ul style="Display:inline;">
>> <li></li><li></li></li>
>> </ul>
>>
>> This would cause columns to be shown.

>
> No, it doesn't. Did you test this before you posted, RtD?


Course he didn't.
What a wingnut.

--
Mama say, everybody little bit gay.
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      03-09-2012
On Thu, 8 Mar 2012 11:35:44 +0000 (UTC), Doug Miller wrote:

> richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
> 40tude.net:
>
>> Use <ul> instead.
>>
>> <ul style="Display:inline;">
>> <li></li><li></li></li>
>> </ul>
>>
>> This would cause columns to be shown.

>
> No, it doesn't. Did you test this before you posted, RtD?


http://1littleworld.net/notable.html
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      03-09-2012
richard the sto0pid dumbass wrote:

> Doug Miller wrote:
>> richard <(E-Mail Removed)> wrote:
>>
>>> Use <ul> instead.
>>>
>>> <ul style="Display:inline;">
>>> <li></li><li></li></li>
>>> </ul>
>>>
>>> This would cause columns to be shown.

>>
>> No, it doesn't. Did you test this before you posted, RtD?

>
> http://1littleworld.net/notable.html


Jeebus! You just *can't* write an error-free page!

<http://validator.w3.org/check?verbos...ittleworld.net
%2Fnotable.html>

You should just give up web authoring and stick with the kiddie porn and
mocking the police.

--
-bts
-This space for rent, but the price is high
 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      03-09-2012
richard <(E-Mail Removed)> wrote in news:5z1t8a37gugg$.77qu7ceprhzp$.dlg@
40tude.net:

> On Thu, 8 Mar 2012 11:35:44 +0000 (UTC), Doug Miller wrote:
>
>> richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
>> 40tude.net:
>>
>>> Use <ul> instead.
>>>
>>> <ul style="Display:inline;">
>>> <li></li><li></li></li>
>>> </ul>
>>>
>>> This would cause columns to be shown.

>>
>> No, it doesn't. Did you test this before you posted, RtD?

>
> http://1littleworld.net/notable.html
>

Where we do ***NOT*** find "<ul style="Display:inline;">, RtD.

<Style type="text/css">

ul li {list-style-type:none; display:inline-block; width:100px; height:100px;
border:solid 2px #00f; margin:0px;}
ul {margin:0px;}
</style>


 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      03-12-2012
On Fri, 9 Mar 2012 04:25:14 +0000 (UTC), Beauregard T. Shagnasty wrote:

> richard the sto0pid dumbass wrote:
>
>> Doug Miller wrote:
>>> richard <(E-Mail Removed)> wrote:
>>>
>>>> Use <ul> instead.
>>>>
>>>> <ul style="Display:inline;">
>>>> <li></li><li></li></li>
>>>> </ul>
>>>>
>>>> This would cause columns to be shown.
>>>
>>> No, it doesn't. Did you test this before you posted, RtD?

>>
>> http://1littleworld.net/notable.html

>
> Jeebus! You just *can't* write an error-free page!
>
> <http://validator.w3.org/check?verbos...ittleworld.net
> %2Fnotable.html>
>
> You should just give up web authoring and stick with the kiddie porn and
> mocking the police.


BFD wrong end tags for that document.
errors fixed.
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      03-12-2012
On Fri, 9 Mar 2012 11:40:58 +0000 (UTC), Doug Miller wrote:

> richard <(E-Mail Removed)> wrote in news:5z1t8a37gugg$.77qu7ceprhzp$.dlg@
> 40tude.net:
>
>> On Thu, 8 Mar 2012 11:35:44 +0000 (UTC), Doug Miller wrote:
>>
>>> richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
>>> 40tude.net:
>>>
>>>> Use <ul> instead.
>>>>
>>>> <ul style="Display:inline;">
>>>> <li></li><li></li></li>
>>>> </ul>
>>>>
>>>> This would cause columns to be shown.
>>>
>>> No, it doesn't. Did you test this before you posted, RtD?

>>
>> http://1littleworld.net/notable.html
>>

> Where we do ***NOT*** find "<ul style="Display:inline;">, RtD.
>
> <Style type="text/css">
>
> ul li {list-style-type:none; display:inline-block; width:100px; height:100px;
> border:solid 2px #00f; margin:0px;}
> ul {margin:0px;}
> </style>


Correct. Because I wanted to show the two different possible styles.
In the post to the group, it's a wonder you're not bitching because I used
the inline styling method as well.
Or bitching about how come I left out padding in the UL styling.

Where exactly is your absolutely perfect web site again?
In the recycle bin?
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      03-12-2012
Hot-Text wrote:
>
> For UL LI can not be on the same line


Aside of the fact that *no one* is using that ancient version of
Netscape that didn't support the STYLE element, UL and LI can ABSOLUTELY
"be on the same line" in a stylesheet rule. You need to look up
*descendant selectors*.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      03-12-2012
richard <(E-Mail Removed)> wrote in news:13zhtajcvp96e.901pysc70k90$.dlg@
40tude.net:

> On Fri, 9 Mar 2012 11:40:58 +0000 (UTC), Doug Miller wrote:
>
>> richard <(E-Mail Removed)> wrote in news:5z1t8a37gugg$.77qu7ceprhzp$.dlg@
>> 40tude.net:
>>
>>> On Thu, 8 Mar 2012 11:35:44 +0000 (UTC), Doug Miller wrote:
>>>
>>>> richard <(E-Mail Removed)> wrote in news:1l0zwltn2ti9d$.1ottvsrqvz2og.dlg@
>>>> 40tude.net:
>>>>
>>>>> Use <ul> instead.
>>>>>
>>>>> <ul style="Display:inline;">
>>>>> <li></li><li></li></li>
>>>>> </ul>
>>>>>
>>>>> This would cause columns to be shown.
>>>>
>>>> No, it doesn't. Did you test this before you posted, RtD?
>>>
>>> http://1littleworld.net/notable.html
>>>

>> Where we do ***NOT*** find "<ul style="Display:inline;">, RtD.
>>
>> <Style type="text/css">
>>
>> ul li {list-style-type:none; display:inline-block; width:100px; height:100px;
>> border:solid 2px #00f; margin:0px;}
>> ul {margin:0px;}
>> </style>

>
> Correct. Because I wanted to show the two different possible styles.


Apparently it hasn't sunk into you yet that the first one DOESN'T WORK.

> In the post to the group, it's a wonder you're not bitching because I used
> the inline styling method as well.


No, RtD, I'm bitching because you posted something that DOESN'T WORK.

 
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: Replacing tables with divs dorayme HTML 15 03-11-2012 02:28 AM
Re: Replacing tables with divs idle HTML 14 03-09-2012 04:17 AM
Re: Replacing tables with divs Jukka K. Korpela HTML 3 03-08-2012 01:40 PM
Re: Replacing tables with divs Gus Richter HTML 0 03-08-2012 01:16 AM
Managing divs within divs.... rich HTML 0 02-02-2006 07:38 PM



Advertisments