html,css 본문 가변폭

2단

html:
  1. <div class="aside">aside-left</div>
  2. <div id="container">
  3.     <div class="content">content</div>
  4. </div>

css:
  1. #container{float:left;width:100%;margin-right:-200px}
  2. .content{margin-right:200px}
  3. .aside{float:left;width:200px}


3단

html

<div id="container">
    <p>#container</p>
    <div class="snb">
        <p>.snb</p>
    </div>
    <div id="content">
        <p>#content</p>
    </div>
    <div class="aside">
        <p>.aside</p>
    </div>
    <div class="clear"></div>
</div>

css

#container{*display:inline-block;_width /**/:100%;padding-right:200px;padding-left:200px}
#container:after{display:block;clear:both;content:''}
.snb{float:left;position:relative;left:-200px;width:180px;margin-right:-180px}
#content{float:left;width:100%}
.aside{float:left;position:relative;left:200px;width:182px;margin-left:-182px}
html,css 본문 가변폭 html,css 본문 가변폭 Reviewed by Unknown on 오후 3:50 Rating: 5

댓글 없음:

Powered by Blogger.