li 정렬 관련 질문입니다.
늘빈
가로로 100%로 꽉찬 표를 만드는데
총 5개의 칸이 화면을 줄였다 늘여도 같은%로 있어야하는데
제가 li 로 작업을 하면 오른쪽에 여백이 많이 생기고 브라우저를 줄이면 칸이 내려옵니다.
그래서 샘플로 첨부파일처럼 작업하니
아래 소스처럼 빨강부분(li로 작업)은 전체 100%에는 꽉차지 않고
파랑 부분(table로 작업)은 제가 원하는 모양으로 만들어집니다..
둘중에 한가지로 작업을 해야하는데..
문제는 이 부분을 close 했다가 open도 해야해요.
그럼.. 제가 뭘 잘못했는지 도대체 모르겠습니다. ㅠㅠ
간단할것도 같은데.. 왜 전 안되는지.. 완전 바보된 듯..
하코사 고수님들의 도움좀 받고 싶습니다. 제발 도와주세요.ㅠㅠ
첨부파일은
1. 예제로 작업한 파일 : ex-1.html
2. 실제 작업한 파일 일부 :4-13-04-03 -하코사.zip
----------------- 소스 ------------------------------------------------------------------------------------
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleUntitled Document/title
style type=text/css
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td,optgroup,option {
margin:0;
padding:0;
}
ol, ul, li {list-style:none;}
#contents-wrap { width:100%;}
#topmenu1 { width:100%; height:121px; margin:0 auto; border:1px solid red; margin-bottom:27px;}
#topmenu1 #menu1 { margin:0 auto; width:100%; border:0px solid red;}
#topmenu1 ul.menu1 { padding:0px;}
#topmenu1 ul.menu1 li { float:left; width:10%; height:121px; margin:0 auto; font-size:15px; color:#red; border:1px solid red;}
#topmenu1 ul.menu1 li.menu-margin1 { text-align:center;}
#topmenu1 ul.menu1 li.margin2 { width:50px;}
#test-wrap { width:100%; min-width:550px; height:120px; margin:0 auto; border:1px solid #09F; }
#test-wrap table.test-1 { width:100%; margin:0 auto; }
#test-wrap table td.test-2 { text-align:center; vertical-align:middle; height:114px; border:1px solid #09F;}
#test-wrap table td.close { text-align:center; vertical-align:top; height:114px; width:50px; border:1px solid #09F;}
/style
body
div id=contents-wrap
div id=topmenu1
ul class=menu1 id=menu1
li class=menu-margin1a href=home.html target=_topcount1br /1,358/a /li
li class=menu-margin1a href=Cattle.html target=_topcount2br /234/a /li
li class=menu-margin1a href=Pen.html target=_topcount3br /897/a /li
li class=menu-margin1a href=Schedule.html target=_topcount4br /721/a /li
li class=menu-margin1 margin2a href=home.html target=_topclose/a /li
/ul
/div
div id=test-wrap
table class=test-1
tr
td class=test-2count1br /1,358/td
td class=test-2count2br /234/td
td class=test-2count3br /897/td
td class=test-2count4br /721/td
td class=closeclose/td
tr
/table
/div
/div
/body
/html
-
남은 2024-09-18
감사합니다. 제가 잘못한 부분 콕 찝어주셨네요.ㅎㅎㅎ
-
큰나라 2024-09-18
#topmenu1 ul.menu1 li 요기 부분에 10%로 되어있네요 근데 li는 5개밖에 없으니 절반이 남을수밖에요
table은 10%로 5개를 줘도 부모의 크기만큼 알아서 늘려주기때문에 저렇게 잘 나오는거구요 ^^
그리고 float:left 줬을땐 margin:0 auto 안주셔도 됩니다 width값이 100% 일때도 마찬가지구요 -
이솔 2024-09-18
앗.. 네.. 감사합니다.^^
-
나나 2024-09-18
테이블에서 tr부분도 안닫혀있네요~ 참고하세요
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2668944 | 이 사이트의 테마는 뭘까요? | 갅지돋는슬아 | 2024-09-19 |
2668918 | InputStream 을 String형으로 변환 (7) | 은G | 2024-09-19 |
2668893 | 자바 랜덤함수에 대해 질문 드립니다. (3) | 달콤이 | 2024-09-19 |
2668865 | [질문]AIR에서 크로스 도메인간 이미지 로드 | 여우By | 2024-09-19 |
2668806 | li 정렬 관련 질문입니다. (4) | 늘빈 | 2024-09-18 |
2668782 | ul li 내부 ul li 서브메뉴가 보여지게 하고싶은데용.. (8) | 달빛 | 2024-09-18 |
2668725 | 액션으로 조정하는 블러필터효과 다시 질문드립니다^^;;; (5) | 소아 | 2024-09-17 |
2668693 | temp의개념.을. | 그리 | 2024-09-17 |
2668663 | 살짝 궁금한게있는데.. (5) | 너만 | 2024-09-17 |
2668635 | footer 맨 아래에 고정시키기..ㅜㅜ (2) | 조은 | 2024-09-17 |
2668607 | C++ 오류 | 유진깡 | 2024-09-16 |
2668580 | 이런 질문 수없이 많이 올라왔겠죠.. (10) | 다연 | 2024-09-16 |
2668530 | 반지름이 5인 원의 둘레와 면적을 구하는 프로그램을 작성하라. (3) | 곰돌츼 | 2024-09-16 |
2668502 | 혹시 워드프레스 사용하시는 분 있나요? (3) | 꽃햇님 | 2024-09-15 |
2668403 | 주석 부분은 스크린 리더에서 읽는 것인지요? (2) | 민트향 | 2024-09-14 |
2668377 | 미분이나 적분 수식을 코딩으로 하려면 ..... (1) | 대나무 | 2024-09-14 |
2668351 | 명령행 인자를 전달해주는 방법좀 알려주세요. | 아리알찬 | 2024-09-14 |
2668323 | 웹서비스질문. (1) | 선아 | 2024-09-14 |
2668293 | "/aa"에서 /가 도대체 뭔지..ㅡㅡ;; (5) | 천사 | 2024-09-13 |
2668269 | 다른언어와 비교하여서 자바가 좋은점이 뭔가요..? (9) | 진나 | 2024-09-13 |