How to valign text in cells with HTML? |
How to valign text in cells with HTML? |
sajox |
Jun 17 2020, 10:12 AM
Post
#1
|
Group: Members Posts: 9 Joined: 16-June 20 Member No.: 27,402 |
Hello everyone! I am currently learning HTML and CSS and I have a problem When creating a table and entering data in it, I used valign in the code (Used for vertical centering of text). However, valign does not work in every cell but only in those I used rowspan ( Used to vertically join cells in different rows)
For example: <td valign = "top" rowspan = "3"> 4 </td> here vertically centers the text to the top without any problems However when I apply this to a regular cell where I did not use rowspan for example like this <td valign = "bottom"> 3 </td> It doesn't center the data I entered in the cell vertically at all. Does anyone know what the problem is? I will be very grateful for the answer |
pandy |
Jun 17 2020, 12:11 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
No. Could you post the whole table, please.
|
Christian J |
Jun 17 2020, 12:54 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
|
pandy |
Jun 17 2020, 02:46 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I don't think the OP wants it centered, he probably meant aligned. He uses valign="bottom".
|
deb1 |
Jun 19 2020, 12:52 PM
Post
#5
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
|
pandy |
Jun 19 2020, 02:17 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Short for Original Poster, the person who started the thread.
|
Lo-Fi Version | Time is now: 25th April 2024 - 12:40 PM |