DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: TGTarheel on January 09, 2019, 01:53:16 AM



Title: Tables Question
Post by: TGTarheel on January 09, 2019, 01:53:16 AM
Is there a way to make two tables show up side by side, instead on one under the other?


Title: Re: Tables Question
Post by: Aeolus on January 09, 2019, 02:27:00 AM
Look up CSS's "float" property.


Title: Re: Tables Question
Post by: TGTarheel on January 09, 2019, 03:08:59 AM
Look up CSS's "float" property.

So it would need to be done in the style sheets of the templates themselves, and not the module?


Title: Re: Tables Question
Post by: Aeolus on January 09, 2019, 03:22:55 PM
So it would need to be done in the style sheets of the templates themselves, and not the module?

Nope. Not everything CSS has to be done in the style sheets of templates. You can use CSS inline in HTML's "style" attribute.


Title: Re: Tables Question
Post by: TGTarheel on January 09, 2019, 06:29:08 PM
So it would need to be done in the style sheets of the templates themselves, and not the module?

Nope. Not everything CSS has to be done in the style sheets of templates. You can use CSS inline in HTML's "style" attribute.
OK, I noticed the function cssfloat.  Because "float" is reserved in Java.  You can use this directly within a module, then?  Was not sure LOTGD would recognize the function as it is not defined within LOTGD.


Title: Re: Tables Question
Post by: Aeolus on January 09, 2019, 08:38:07 PM
OK, I noticed the function cssfloat.  Because "float" is reserved in Java.  You can use this directly within a module, then?  Was not sure LOTGD would recognize the function as it is not defined within LOTGD.

"cssFloat" is the Javascript property, but that's not necessary here at all. Whatever table you're wanting align, just set the "style" attribute to "float:left" in the table'a HTML itself.


Title: Re: Tables Question
Post by: TGTarheel on January 10, 2019, 06:55:31 AM
OK, I noticed the function cssfloat.  Because "float" is reserved in Java.  You can use this directly within a module, then?  Was not sure LOTGD would recognize the function as it is not defined within LOTGD.

"cssFloat" is the Javascript property, but that's not necessary here at all. Whatever table you're wanting align, just set the "style" attribute to "float:left" in the table'a HTML itself.

But how to make the next table show up just to the right of the first one...instead of underneath?


Title: Re: Tables Question
Post by: Anharat on January 10, 2019, 09:30:46 AM
The tables (including borders and margin) must not exceed 100% width of the parent element, else they will still show under each other even while floating.


Title: Re: Tables Question
Post by: TGTarheel on January 10, 2019, 11:15:35 PM
The tables (including borders and margin) must not exceed 100% width of the parent element, else they will still show under each other even while floating.

And that is different based on the screen size of the end user, isn't it?


Title: Re: Tables Question
Post by: Aeolus on January 11, 2019, 12:18:41 AM
And that is different based on the screen size of the end user, isn't it?

Sometimes. If you have a wide table and narrow view (e.g. mobile phone), then there's not overly much you can do.

But how to make the next table show up just to the right of the first one...instead of underneath?
Whatever table you're wanting align, just set the "style" attribute to "float:left" in the table'a HTML itself.

I had already said.

The other way, though not recommended, is to create a "wrapper" table and cells, and put the tables in those cells. So:

Table
Row 1
Cell 1 - Includes first table
Cell 2 - Includes second table
End row
End table


Title: Re: Tables Question
Post by: TGTarheel on January 11, 2019, 02:43:23 AM
And that is different based on the screen size of the end user, isn't it?

Sometimes. If you have a wide table and narrow view (e.g. mobile phone), then there's not overly much you can do.

But how to make the next table show up just to the right of the first one...instead of underneath?
Whatever table you're wanting align, just set the "style" attribute to "float:left" in the table'a HTML itself.

I had already said.

The other way, though not recommended, is to create a "wrapper" table and cells, and put the tables in those cells. So:

Table
Row 1
Cell 1 - Includes first table
Cell 2 - Includes second table
End row
End table

Actually, I have put a table inside of a table before.  Not sure why I did not think of it.
Just something I am tossing around as part of a new module I am trying to work on.  I thought in this case, what i am working on....a side-by-side table would be more user-friendly.  It''s not normally a format I like, either.

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines