Author Topic: Absolute Cell Positioning  (Read 1222 times)

T-Bone

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Absolute Cell Positioning
« on: November 28, 2011, 08:45:42 AM »
When I use the /div position code it moves text but not cell borders. Do I need to add some sort of border command in the positioning statement?
If it ain't naked, deep-fried or poker-related, I ain't interested!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Absolute Cell Positioning
« Reply #1 on: November 29, 2011, 04:37:10 PM »
Cells are not meant to be positioned in an absolute manner.  The way the cell is constructed "underneath the covers" explains why the borders remain where they while the cell contents move.  If you want to absolutely position a cell, you're probably going to have to resort to specifying the HTML entirely yourself, and not using the various display settings of the cell itself.

So, for example, if you set the following HTML styles on the Clock cell (using the default blue/green layout):

position: absolute
top: 10px
left: 10px

You'll see what you describe.  The clock text itself moves to the top left of the screen, but it has no background color or border.  Instead, leave out those attributes and change the clock cell HTML to:

<div style="position: absolute; left: 10px; top: 10px; border: 2px solid #ffffff; background-color: #003a75">
  <div style="font-family: Arial; font-size: 120pt; color: white; width: 1px; filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=3, OffY=3, Color=black)"><clock>
  </div>
</div>


* That width: 1px attribute in there is to overcome an idiosyncrasy of the filter attribute that gives the clock a drop-shadow.  Without this, it simply won't display a drop-shadow.  Assigning a width to the div gives it a "layout" (an HTML layout, not a Tournament Director layout), even though it will be larger than the 1 pixel we assigned it.

T-Bone

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Absolute Cell Positioning
« Reply #2 on: December 01, 2011, 04:56:31 AM »
Thanks, Corey. As always, great tech support.
If it ain't naked, deep-fried or poker-related, I ain't interested!