dppcyt6157 2014-12-15 13:08
浏览 137
已采纳

Html - Css在一个窗口中对齐3个Div

My Current project consists of a window which includes a Horizontal Navigation Menu, a Vertical Navigation Menu, a set of buttons and finally a Table .

So the structure is like this

enter image description here

1. Div of Horizontal Navigation Menu
2. Div of Vertical Navigation Menu
3. Div with a set of buttons
4. Div with a Table inside

I tried it today, as per my work, The 1st and 2nd DIVS positioned correctly. when come to 3rd and 4th DIVS its not positioning correctly.

so i tried code like following

<div style="float:left;"> // That white window
    <div style="float:right"> // Yellow div
        buttons.....
    </div>
    <div style="float:left"> // Orange div
        <Table>....</table>
    </div>
</div>

but 3rd div not aligning properly when I tested it in systems with different resolutions. So

  1. how to align that 3rd div to the EXTREME RIGHT of window and 4th div to the Centre of the window(centre of above white window)

  2. and how to make 3rd and 4th Window fixed at that position even Window minimized to smaller.

Any help on this problem would be greatly appreciated.

  • 写回答

1条回答 默认 最新

  • douyi2664 2014-12-15 13:26
    关注

    Something like this?.

    http://jsfiddle.net/jmtyjhpq/3/embedded/result/

    Else post some of you CSS also. then i can have a look again. Greeetz

        #wrapper
    {
        margin:0px;
        padding:0px;
        height:100%;
        width:100%;    
    }
    
    .divone
    {
        width:100%;
        height:300px;
        background-color:blue;
    }
    .divto
    {
        position: relative;
        height:900px;
        width:250px;
        float:left;
        background-color:green;
    }
    
    .divthree
    {
        float:right;
        width:250px;
        height:150px;
        background-color:yellow;
        display:block;
        margin-right:50px;
        position:relative;
    }
    
    .divfor{
        float:right;
        width:600px;
         height:600px;
        background-color:gray;
        margin-top:180px;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog