clear:both 지정시.. 마진이 생깁니다
한가람
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
html xmlns=http://www.w3.org/1999/xhtml
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
meta http-equiv=imagetoolbar content=no /
meta name=robots content=all,index,follow /
meta name=Distribution content=global /
link rel=stylesheet type=text/css href=./styles.css /
titleTHE STUFF THAT DREAMS ARE MADE OFF/title
/head
body
div id=wrapper
div id=top/div
div id=header
div id=home/div
/div
div id=contenttop/div
div id=sidebarcontainer
div id=sidebarwrapper
div id=sidebartop/div
div id=nav
ul
lia href=#HOME/a/li
lia href=#ABOUT US/a/li
lia href=#HOW TO ORDER/a/li
lia href=#SUBJECT LISTINGS/a
ul
lia href=#Horror/a/li
lia href=#Hollywood Players/a/li
lia href=#British Players/a/li
lia href=#International Players/a/li
lia href=#HIS NIBS MR. SCRATCH/a/li
lia href=#Books/Literary/a/li
lia href=#Antiques/Bric-A-Brac/a/li
lia href=./list.html id=currentJewels (9)/a/li
lia href=#Miscellaneous/a/li
/ul
/li
lia href=#CONTACT US/a/li
/ul
/div
div id=sidebarbottom/div
/div
/div
div id=content
hr class=hidden /
h2jewels List/h2
ul
liListli
liListli
liListli
liListli
liListli
liListli
liListli
liListli
/ul
div style=float: left; margin-top: 20px;pb1/b/p/div
div style=float: right; margin-top: 20px;p[Write] [Logout] [Admin]/p/div
div style=clear: both;/div
요아래로 여백이 생기네요 ㅠ.ㅠ
hr /
div style=margin-top: 20px; text-align: right;/div
br /
/div
div id=bottom/div
/div
div id=footer/div
/body
/html위의 노란부분 입니다.
상위에 float:left, float:right 사용후..
밑에서 clear:both 지정시.. 마진이 생깁니다.
익스6은 괜찮은데 파폭이나 크롬에서 문제입니다.
다른페이지는 괜찮은데 유독 한페이지에서만 그러는데 원인을 못찾겠어요 ㅠㅠcss 내용
#wrapper { width : 822px; text-align : left; background : url(./img/middle.png); margin : 0 auto; padding : 0; } #top { height : 53px; width : 822px; background : url(./img/top.png) no-repeat; } #header { background : url(./img/header.png) no-repeat; width : 822px; height : 120px; } #home { width : 756px; height : 120px; background : url(./img/home.png) no-repeat; padding : 0; margin : 0 0 0 32px; } #contenttop { width : 822px; height : 36px; background : url(./img/contenttop.png) no-repeat; margin-top : 0; padding : 0; } #sidebarcontainer { width : 192px; float : left; } #sidebarwrapper { width : 192px; background : url(./img/sidemiddleleft.png) repeat-y; } #sidebartop { background : url(./img/sidetopleft.png) no-repeat; height : 36px; width : 192px; } #nav { padding-left : 18px; margin-bottom : 24px; padding-right : 0; } #nav ul { list-style : none; margin : 0; padding : 0; } #nav ul ul a { text-indent : 20px; } #nav a { height : 20px; display : block; padding-top : 5px; padding-right : 5px; padding-left : 5px; color : #333333; text-decoration : none; border-bottom : 1px solid #e6e6e6; } #nav a:hover { color : #fafafa; background-color : #b8bc9b; } #nav #current { color : #fafafa; background-color : #b8bc9b; } #sidebarbottom { background : url(./img/sidebottomleft.png) no-repeat; height : 36px; width : 192px; } #content { width : 510px; margin : 10px 0 0 240px; line-height : 200%; } #content ul { list-style : none; margin : 0; padding : 0; } #bottom { background : url(./img/bottom2.png); width : 822px; height : 77px; clear : both; } #footer { width : 770px; height : 50px; border : 0 solid #000000; text-align : right; margin : 0 auto; padding : 0; } .tdheight { height : 50px; } body { line-height : 16px; color : #333; margin : 10px; background : url(./img/bg.png); text-align : center; } body, table, tr, td, select, input, div, form, textarea, font { font-family : Verdana; font-size : 12px; } .new { color : #ff5a00; font-size : 10px; } h1 { list-style-type : none; } h2 { list-style-type : none; color : #727a35; font-size : 16px; } p { line-height : 200%; } fieldset { border : 0; } img { border : none; vertical-align : middle; } .red { color : #ff5a00; } .hidden { display : none; } a:link { color : #333333; text-decoration : none; } a:visited { color : #333333; text-decoration : none; } a:active { color : #333333; text-decoration : none; } a:hover { color : #333333; text-decoration : none; }
-
빛초롱
아 감사합니다. 잘배웠습니다.
-
앵겨쭈
lilistli이구분이 잘못 되었네요.
li를 열고 /li를 닫아야 맞겠죠?ㅋ
기존 비공수다님께서 코딩 하신 방법으로 보면
nav의 세로 길이가 늘어나는 만큼 왼쪽 content안의 여백도 비례 하게 늘어나고 있었어요.
그걸 float:left;로 잡아 준거구요. -
도1도캣
흠...
먼저 strict를 쓰셨는데 가장 기본적으로 li/li를 안지키셨네요~
strict엄격모드로 기본적인거 부터 지키시는게 좋겠죠~
물론 이 문제에선 /li를 닫지 않았다고 해서 나는 현상은 아닙니다.
왼쪽 nav와 문제가 쫌 있는거 같습니다만
전체 레이아웃을 새로 재 코딩이 제일 좋을거 같습니다만 간단 하게
//////////////////////////////
#content {
width : 510px;
margin : 10px 0 0 2 -
카이
혹시 전체 속성에 margin:0;padding:0 잡아 주셨나요?
코딩 작업만 올려 주시는 것보다 css같이 올려 주시는게....;; -
리카
살려주세요 스트레스받아 죽겠습니다. ㅠㅠ
위의 그림 볼드로 1부터 아래로 hr / 까지 여백이 생겨서요 -
진나
저렇게만 말하시면...아무래도 뭐가 문제 인지를...
소스를 올려주시는게 젤 좋을것같아요... -
슬S2아
li 가 잘못됬나요? 발리데이션은 통과 되던데... 아무튼 너무 감사
-
해찬나래
헉 너무 감사합니다.
하루동안 답답해죽을뻔 했습니다. 정말감사 ♡ -
다미
전체속성에 마진 페딩 안잡았습니다.
부탁드려요 어디가 잘못된건지 도무지 개념이..