1 reply [Last post]
jpro1001
jpro1001's picture
Offline
newbie
Last seen: 7 years 26 weeks ago
Timezone: GMT-7
Joined: 2014-03-18
Posts: 1
Points: 2

anyone know how I can get one of my two fields to stretch over another field, but truncate if either are too big? e.g.

Example #1:

Field1 = "AAAAAAAAAAAAAAAAAAAAAAAAA"
Field2 = "BBBBBBBBBBB"

Display:
"AAAAAAAAAAAAAAAAAAAAAAAAA""BBBBBBBBBBB"

Example #2
Field1 = "AAAAAAAAAAAAAAAAAAAAAAAAA"
Field2 = "BBBBBBBBBBBBBBBBBBBBBBBBB"

Display:
AAAAAAAAAAAAAAAAA...BBBBBBBBBBBBBBBBB...

Any help would be greatly appreciated!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 6 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

Hi jpro1001, You could float

Hi jpro1001,
You could float them both left and set the max-width to 50%.
Or set overflow to hidden on the element that contains them.