2012-04-03 9 views

答えて

3

http://jsfiddle.net/AHk78/

HTML

<div id="upleft"></div> 
<div id="upright"></div> 
<div id="below"></div>​ 

CSS

#upleft { width:100px; height: 500px; background:red; float:left; } 
#upright { width:300px; height:200px; background:blue; float:left } 
#below { height:300px; width:100%; background:green; clear:both } 
1

CSS:

#divA 
{ 
    float:left; 
    width: <width of div A>; 
} 
#divB 
{ 
    float:left; 
    width: <width of div B>; 
} 

#divC 
{ 
    clear:both; 
} 

HTML:

<div id="divA"></div> 
<div id="divB"></div> 
<div id="divC"></div> 
0

このような何か:

フロート:左

B float:left;

C clear:both;

2

私はセクションのパーセンテージを作成し、ユーザーがどのような画面サイズを持っていてもこれらの比率を得ることができます。

CSS

#sectionA 
{ 
    float:left; 
    width: 20%; 
} 
#sectionB 
{ 
    float:left; 
    width: 80%; 
} 

#sectionB 
{ 
    clear:both; 
    width: 100%; 
} 

HTML

<div id="sectionA"></div> 
<div id="sectionB"></div> 
<div id="sectionC"></div> 
+0

私はコピーと貼り付けのために得るものです:P –

0

こんにちは、あなたは、単にこの

のCssなど、これを行うことができます

#left { 
    width:100px; 
    min-height: 300px; 
    background:red; 
    float:left; 
} 
#right { 
    min-height:200px; 
    background:blue; 
    float:left; 
    width:400px; 
} 

#bottom{ 
    height:200px; 
    background:green; 
    clear:both; 
} 
​ 

HTML

<div id="left"></div> 
<div id="right"></div> 
<div id="bottom"></div>​ 

ライブデモlink herehttp://jsfiddle.net/rohitazad/AHk78/2/

1

あなたは右の位置合わせのための例を次のようにインラインでそれを作ることができます。

<div style="width:30%;float:right"><!--write your required tags--></div> 

彼再幅と浮動小数点は、必要に応じて変化します

関連する問題