dqppv86022 2013-12-17 18:03
浏览 13
已采纳

固定列布局引导程序3

I am curious, and I have been looking everywhere. I am trying to create a three column layout where the left, and right columns are sticky, and the center column is not sticky. I have tried adding the data-spy="affix" to my code, and even set an offset, I can get the left column to become sticky, but the right column when adding the dataspy appears nested within the left column.

Code Below:

<div class="container-fluid">
    <div class="row-fluid">
        <div class="well span2"><?="Left Column";?></div>
        <div class="well span8"><?="Center Column";?></div>
        <div class="well span2"><?="Right Column";?></div>
    </div>
</div>

Also, inline PHP code will contain some php scripts later on if you are wondering why it looks funny...

Edit

Css Code

.stick_r {
    position:fixed;
    right:10px;
}
.stick_l {
    position:fixed;
    left:10px;
}

HTML Code

<div class="container-fluid">
    <div class="row-fluid">
        <div class="well span2 stick_l">Left Column</div>
        <div class="well span8">Center Column</div>
        <div class="well span2 stick_r">Right Column</div>
    </div>
</div>

Looks like Center Column is underneath the Center Column. When offsetting it appears way to far to the right.

enter image description here

Instead of

enter image description here

  • 写回答

2条回答 默认 最新

  • dongzhi6382 2013-12-17 18:22
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Qt安装后运行不了,这是我电脑的问题吗
  • ¥15 数据量少可以用MK趋势分析吗
  • ¥15 使用VH6501干扰RTR位,CANoe上显示的错误帧不足32个就进入bus off快慢恢复,为什么?
  • ¥15 大智慧怎么编写一个选股程序
  • ¥100 python 调用 cgps 命令获取 实时位置信息
  • ¥15 两台交换机分别是trunk接口和access接口为何无法通信,通信过程是如何?
  • ¥15 C语言使用vscode编码错误
  • ¥15 用KSV5转成本时,如何不生成那笔中间凭证
  • ¥20 ensp怎么配置让PC1和PC2通讯上
  • ¥50 有没有适合匹配类似图中的运动规律的图像处理算法