HTML 테이블의 내용이 올바르게 설정되지 않았습니다. 그리고 가능한 모든 방법을 시도해 보았지만 아직 해결할 수 없습니다. 보세요.테이블 내용이 정렬되지 않음
.abc{
border-radius: 20px;
background-color: #f2f2f2 ;
padding: 20px;
opacity: 0.8;
margin-top: -50px;
margin-left: -100px;
position: fixed;
top: 30%;
left: 45%;
}
table {
border-collapse: collapse;
width: 100%;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
td {
background-color: #ffa64d;
color: black;
}
<h1><samp>Student Details</samp></h1>
<p> <%= link_to "Add new record", new_user_path %></p>
<table border=3>
<tr>
<th>Firstname</th>
<th>SecondName</th>
<th>Address</th>
<th>Action</th>
</tr>
<% @users.each do |user| %>
<table border=3>
<tr>
<td><%= user.firstname%></td>
<td><%= user.lastname%></td>
<td><%= user.address %></td>
<td><%= link_to "Delete",user,:method =>:delete,
data:{:confirm => 'Are you Sure?'} %><br><%= link_to "Edit", edit_user_path(user) %></td>
</tr>
</table>
<% end %>
피들을 제공 해주시겠습니까? –
"HTML 표의 내용이 올바르게 설정되지 않았습니다."- 어떤 표가 사용됩니까? HTML을 제공하지 않았습니다. 이 맥락에서 "적절하게"의미하는 것은 무엇입니까? – Quentin
https://jsfiddle.net/aniket5689/0hj1fyew/ –