在没有滚动条的情况下垂直增长div

时间:2015-02-05 12:13:40

标签: html css

我有以下CSS代码:

#maincol{
 background-color: #fff;  
 position: relative; 
 width:1360px;
 height:800px;
 padding:0px 0px 0px 30px;
 }

#widgetcontainer{
 background-color: #00386B;  
 position: relative; 
 width:1390px;
 height:100%;
 Margin: 0px 0px 0px 0px;
 Padding:0px 10px 0px 0px;
 Overflow:auto;


 }


.widget{
 background-color: #BAC6DE;  
 float:left;

 width:200px;
height:100%;
 margin:0px 10px 0px 0px;
 padding:0px 10px 0px 0px;
 }

我想在不使用滚动条的情况下生成代码,因此当达到100%时,div会继续随文本一起增长。但我想在IE中使用主电源栏,而不是在iFrame中。

HTML就像你看到的那样(如果把它放在JFIDDLE中),它会添加一个滚动条:

<div id="wrapper" class="clearfix">


<div id="maincol">

<div id="widgetcontainer">


    <div class="widget">
    <div class="hover">



<!----------Start NAVIGATION PANEL----------->
<a href="TEAM HOME.htm">TEAM HOME</a>
<a href="BASE.htm" class="current">BASE LINKS PAGE</a>
<a href="EMAIL DRAFTS.htm">EMAIL DRAFT</a>
<!----------End NAVIGATION PANEL----------->


    </div> 

</div>



<!----------Start BASE Links----------->
<font size=5><strong><p>Please Enter Your First Title Here . . .. . .</p></strong></font>
<p><a href="Please Enter Your First Link Here . . ." target=_blank">Please Enter Your First Description Here . . .</a></p>
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<P>A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole 

heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. I am so 

happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 

incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. When, 

while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage 

of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the 

trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the 

little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel 

the presence of the Almighty, who formed us in his own image, and the breath
<!----------End BASE Links----------->



    <br clear=all>

</div>


</div>

但是看看过去的问题,我不确定是否可以做到?

有什么想法吗?

0 个答案:

没有答案