Имеется таблица 3 столбца 100 строк. Как выровнять по правому краю содержимое первого столбца? Через задание стилей тегу Col или Colgroup не получается.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
FSe®g
Добрый день!
Помогите пожалуйста.
Имеется таблица 3 столбца 100 строк. Как выровнять по правому краю содержимое первого столбца? Через задание стилей тегу Col или Colgroup не получается.
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {border: 1px solid black;}
th, td {width: 150px;}
.col1 {text-align:right; background-color:yellow}
</style>
</head>
<body>
<table>
<colgroup>
<col class="col1" />
<col />
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
<tr>
<td>5869207</td>
<td>My first CSS</td>
<td>$49</td>
</tr>
</table>
</body>
</html>
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.