Author Topic: Center align a row or collumn  (Read 2085 times)

mcfrojd

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Center align a row or collumn
« on: December 08, 2012, 07:22:25 AM »
Is there possible to align a row or column to the center of the screen (horizontal) without having to set width to empty columns on the side of the ones you want centered?

i have width set to 2 of the rows inside the red rectangle, and i want these to be centered on screen no matter what resolution.

Is this possible with some HTML-Styles maybe?


Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Center align a row or collumn
« Reply #1 on: December 08, 2012, 01:39:05 PM »
About the only way is to use the empty columns. If the column you will be showing is going to be one set width, then you can set the empty columns to the width needed so that it stays centered. Beyond that, there is not a way, that I'm aware of, to use the actual cell to center it.
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Center align a row or collumn
« Reply #2 on: December 08, 2012, 04:40:17 PM »
It's hard to do, for sure, the way the TD layout works.  In HTML, you could have a table row and specify each cell's size with percentages.  This should size appropriately and allow the middle column to center regardless of resolution.

With the TD, you specify the size of the items within each "slot" in a row (I'd use the word "cell" but that's the same word that names an item in a TD layout).  In a sense, each cell in a row isn't aware of the other cells, so you can't specify a percentage width in the same way.

Usually you'd have to hard code the widths of the outer cells so that the inner cell is centered - but it is screen resolution dependent.  Change the resolution and you have to modify the layout to make it center appropriately.

In 3.2, there is an option for an HTML layout, in which the entire layout is specified using HTML (there are no TD Rows, Columns, or Cells).  You just embed layout tokens directly in your HTML.  This will make it much more flexible, if you're an HTML-coding-type-person.  It will definitely allow what you're trying to do.

Not much help now, I'm sure.  Sorry!

mcfrojd

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Center align a row or collumn
« Reply #3 on: December 09, 2012, 09:39:57 AM »
Sounds great that true HTML layout is coming, cant wait for 3.2.

I guess layouts is going to be able to be much more flexible in future.

Rewriting the software to this new HTML must be a BIG task for Corey, hope things go smooth so the new 3.2 will arrive in some near future.