테이블 정렬관련 질문드려요
든해솔
테이블의 모든 텍스트 정렬을 일단 center로 잡았습니다.
그런데 간혹 좌측정렬이 필요한 td가 있는데요.
그때마다 모든 td에 클래스를 쓰는건 너무 비효율적인데
어떤 방법이 있을까요?;
테스트해보니 콜그룹은 가로사이즈밖에 유효하지 않은 듯 해서요.*본문
table class=list
colgroup
col width=200px /
col style=text-align:left/
col width= /
col width=50px /
col width= /
col width=50px /
/colgroup
tr
thinput type=checkbox name=checkbox3 id=checkbox3 //th
tha href=#키 /a/th
th class=acta href=#한국어 /a/th
tha href=#일본어 /a/th
/tr
tr
tdinput type=checkbox name=checkbox id=checkbox //td
tdewlkrjweiㄵㄷㄱㅈㄱㅈ3423ㄱ4ㅈㅁㄷㄱㅈㄷㄱofje/td
tdinput name=textfield type=text class=inputBasic id=textfield value=얄얄리리얄라셩얄리리얄라셩얄리리얄라셩얄리리얄라셩리리얄라셩 //td
td나는 좌측정렬이다/td
/tr
tr
td1/td
td기본크기/td
td기본/td
td기본/td
/tr
tr
tdinput type=checkbox name=checkbox2 id=checkbox2 //td
tdewrfewe/td
tdinput type=text name=textfield2 id=textfield2 class=inputBasic //td
td나도 좌측정렬이다아아/td
/tr
/table
* css
.list {width:100%; border-collapse:collapse; float:left }
.list th {padding:7px 0 6px 0; border-left:1px solid #d9d9d9;border-right:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9;border-top:1px solid #d9d9d9; background:#f4f4f3; }
.list th a{font-size:12px; color:#666; font-weight:normal; text-decoration:none}
.list th a:hover{ text-decoration:underline}
.list .active { color:#c36 }
.list td { border-left:0; border-right:0; border-bottom:1px solid #e7e7e7;font-size:12px; color:#333; text-align:center; padding:6px 0}
.list td a {font-size:12px; color:#333; font-weight:normal }
.list td a:hover {color:#36c;}
.list tr:hover{ background:#f4f4f4;}
-
싴흐한세여니
흐윽 ㅠ_- 넵 감사합니다^^
-
푸른잎
비효율적이지만 그렇게 하는 노가다뿐이 없습니다.
테이블이 원래 그래요. ^^
가급적 정렬은 통일하고 정렬이 다른 경우가 어떤건지 정의를 해서 다른 클래스를 주세요.