Right align part of sentence |
Right align part of sentence |
denmarks |
Sep 15 2021, 12:34 PM
Post
#1
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
How do a right align part of a sentence?
City name date time I want "City name" to stay left but I want "date time" to tab and right align. I know I can add non breaking spaces but that is too much trouble and breaks if I widen the containing space. |
Christian J |
Sep 15 2021, 12:50 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
If it's a table row I'd use two cells.
If it's a complete sentence, maybe you could float the two parts left and right. If it's just a part of a sentence, please post a complete example because then I don't understand. |
denmarks |
Sep 15 2021, 12:52 PM
Post
#3
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
I figured it out. I used float: right.
|
pandy |
Sep 15 2021, 06:17 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Actually, if it is a table and different cells, you can just align the parts left and right with text-align: left and right. Same goes if they are in different block level boxes, like P or DIV.
|
Christian J |
Sep 15 2021, 06:21 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
Lo-Fi Version | Time is now: 25th April 2024 - 06:52 AM |