How do I widen this column?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I widen this column?

David Pennington-3
I have some columns in a page that display amounts. As you can see, one of the columns is wide enough for the minus sign but the other column is too narrow and the minus is forced onto the line above.

Both entries come from the same printString code so there should be no difference in their presentation.

Can anyone explain how to sort this out?

David
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How do I widen this column?

Esteban A. Maringolo
Can't you specify the width of the column via CSS?

You can use the width or the min-width properties for the element.

html td class: 'number'; with: row moneyValue


td.number {
  min-width: 10em;
  whitespace: nowrap;
}

El dom., 30 de mayo de 2021 07:56, David Pennington <[hidden email]> escribió:
I have some columns in a page that display amounts. As you can see, one of the columns is wide enough for the minus sign but the other column is too narrow and the minus is forced onto the line above.

Both entries come from the same printString code so there should be no difference in their presentation.

Can anyone explain how to sort this out?

David
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How do I widen this column?

David Pennington-3
In reply to this post by David Pennington-3
I forgot to add the image:


On 30 May 2021, at 13:00, [hidden email] wrote:

Send seaside mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of seaside digest..."


Today's Topics:

  1. How do I widen this column? (David Pennington)


----------------------------------------------------------------------

Message: 1
Date: Sun, 30 May 2021 11:56:18 +0100
From: David Pennington <[hidden email]>
To: Seaside - general discussion <[hidden email]>
Subject: [Seaside] How do I widen this column?
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=us-ascii

I have some columns in a page that display amounts. As you can see, one of the columns is wide enough for the minus sign but the other column is too narrow and the minus is forced onto the line above.

Both entries come from the same printString code so there should be no difference in their presentation.

Can anyone explain how to sort this out?

David

------------------------------

Subject: Digest Footer

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


------------------------------

End of seaside Digest, Vol 221, Issue 7
***************************************


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How do I widen this column?

JupiterJones
In reply to this post by David Pennington-3
Hi David,

It’s up to the browser how things are rendered - collapsing tables can be a pain. In this case the Current Balance column is wider than the Amount column because “Current Balance” is a longer string than “Amount"

As Esteban mentioned, the only way to control presentation is css.

If you want seaside to have a say in presentation (ie. by providing css), just use the #style: method…

html tableData 
style: 'min-width: 10em;whitespace: nowrap;’;
with: [ myNumber printString ]

It’s still probably better to add all your styling to an external stylesheet. Without careful planning, embedding css in smalltalk can become harder to maintain.

Cheers

On 30 May 2021, at 8:56 pm, David Pennington <[hidden email]> wrote:

I have some columns in a page that display amounts. As you can see, one of the columns is wide enough for the minus sign but the other column is too narrow and the minus is forced onto the line above.

Both entries come from the same printString code so there should be no difference in their presentation.

Can anyone explain how to sort this out?

David
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside