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条)

报告相同问题?

悬赏问题

  • ¥200 csgo2的viewmatrix值是否还有别的获取方式
  • ¥15 Stable Diffusion,用Ebsynth utility在视频选帧图重绘,第一步报错,蒙版和帧图没法生成,怎么处理啊
  • ¥15 请把下列每一行代码完整地读懂并注释出来
  • ¥15 pycharm运行main文件,显示没有conda环境
  • ¥15 易优eyoucms关于二级栏目调用的问题
  • ¥15 寻找公式识别开发,自动识别整页文档、图像公式的软件
  • ¥15 为什么eclipse不能再下载了?
  • ¥15 编辑cmake lists 明明写了project项目名,但是还是报错怎么回事
  • ¥15 关于#计算机视觉#的问题:求一份高质量桥梁多病害数据集
  • ¥15 特定网页无法访问,已排除网页问题