DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • March 22, 2019, 07:18:09 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Tables Question  (Read 752 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« 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?
Logged
Aeolus
Mod God
*****
Online Online

Posts: 1923


You're welcome.


View Profile WWW
« Reply #1 on: January 09, 2019, 02:27:00 AM »

Look up CSS's "float" property.
Logged

TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #2 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?
Logged
Aeolus
Mod God
*****
Online Online

Posts: 1923


You're welcome.


View Profile WWW
« Reply #3 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.
Logged

TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #4 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.
Logged
Aeolus
Mod God
*****
Online Online

Posts: 1923


You're welcome.


View Profile WWW
« Reply #5 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.
Logged

TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #6 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?
Logged
Anharat
Codemeister
****
Offline Offline

Posts: 282



View Profile
« Reply #7 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.
Logged
TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #8 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?
Logged
Aeolus
Mod God
*****
Online Online

Posts: 1923


You're welcome.


View Profile WWW
« Reply #9 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
Logged

TGTarheel
Mod God
*****
Offline Offline

Posts: 516


View Profile
« Reply #10 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.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
28 Guests, 1 User
Aeolus
Home Forums News Downloads Login Register Advanced Search