SharePoint固定的Footer
原文地址:http://www.eliostruyf.com/sticky-footer-solution-for-sharepoint-2013/
照搬全文:
OFFICE 365 & SHAREPOINT SEARCH / DEVELOPMENT / BRANDING
Sticky Footer Solution for SharePoint 2013
Footers and SharePoint that was the starting point of this blog. Back in August 2010, I blogged about how to create a sticky footer for your SharePoint 2010 sites (blog post can be found hereand here). Now it is time to upgrade this sticky footer solution to SharePoint 2013.
For this sticky footer solution you will only need to add some HTML and CSS markup to the master page html file.
If you used my solution from 2010, you will see that not much has changed.
Adding the HMTL Footer markup to the master page
- Open the master page its HTML file in your favorite text editor (in this example I will use the seattle.html file);
- Do a search for the s4-workspace DIV, and add a new wrapper DIV underneath it;
XHTML
|
1
2
|
<!-- =Wrapper -->
<div class="wrapper">
|
Wrapper DIV location
- Go straight to the bottom of the HTML file and find the last DIV closing tag;
- Replace the DIV's closing tag with the following code:
XHTML
|
1
2
3
4
5
6
7
8
|
<!-- =Push is needed for the footer to be correctly placed on the page. ms-dialogHidden used to hide it in the dialogs. -->
<div class="push ms-dialogHidden"></div>
</div>
<!-- =Footer: ms-dialogHidden used to hide it in the dialogs. -->
<div class="footer ms-dialogHidden">
<span>This is my SharePoint 2013 Footer</span>
</div>
</div>
|
Footer HTML location
- Save the file
Styling your footer
Now that you've added your HTML markup to the master page HTML file, we only need to style the footer.
The CSS markup looks like this:
CSS
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
/* The bottom margin is the negative value of the footer's height */
margin: 0 auto -30px;
overflow: visible !important;
}
.footer, .push {
/* .push must be the same height as .footer */
height: 30px;
/* Multicolumn Layout With Sticky Footer */
clear: both;
}
.footer {
background: #0072C6;
color: #fff;
line-height: 30px;
text-align: center;
}
body #s4-workspace {
margin-bottom: -30px;
}
|
I paced this CSS code for testing purposes in the following location: "/_layouts/15/images/tests/footer.css".
Sticky Footer Result
The result looks like this:
SharePoint 2013 Footer
SharePoint 2013 Footer Scrolling
JavaScript Solution
During the writing of this blog post Randy Drisgill posted his solution of adding a Sticky Footer via JavaScript. The blog post can be found here.
Download the files
SharePoint固定的Footer的更多相关文章
- 懒加载实现的分页&&网站footer自适应
最近在做手机端,发现下拉刷新和上拉加载的jq控件很少而且自我感觉不好用,比如iscroll之类-- 然后自己写了个懒加载的,也很简单,最基础的代码[不喜勿喷,但蛮实用的] wap手机端懒加载分页: 用 ...
- 如何让你的 footer 总是在浏览器底部无论什么分辨率无论什么浏览器?
一个可以用的CSS驱动的可粘在底部的Footer 我们曾经都或多或少的试过用CSS来把Footer固定在底部的经理,但是他们总是不能正常的粘在底部,不是吗?可喜的是,痛苦的研究如何让footer粘在底 ...
- ios解决输入框弹出后position:fixed失效问题
最近在使用AmazeUI进行仿App Mobile Web开发时遇到了讨论众多的position:fixed问题.position:fixed在安卓2.2以上已经实现,但是在ios8以下系统当小键盘激 ...
- CSS布局-圣杯布局
圣杯布局 圣杯布局很完美(兼容所有浏览器,包括IE6),但是使用了相对定位,布局有局限性,宽度控制要改的地方也多. 第一种方法公用部分: .lgyz, .lzrg, .lrzcg, .lcgrz, . ...
- 小技巧css解决移动端ios不兼容position:fixed属性,无需插件
移动端开发仿app头部底部固定设置position:fixed,android2.2以上已经实现.但是在ios8以下系统,当小键盘激活时,都会出现位置浮动问题.如图: 如何解决: 查阅资料之后想到一下 ...
- IOS 键盘弹出导致的position:fixed 无效问题
解决办法(还未测试): 只需要在中间部分外层div添加css样式position:fixed;top:50px; bottom:50px;overflow:scroll;就可以实现效果,无需插件.可拷 ...
- ionic基础知识
ion-header-bar(头部 页眉) 在内容顶部添加一个固定header栏. 用法 <ion-header-bar align-title="left" class=& ...
- 让footer固定在页面(视口)底部(CSS-Sticky-Footer)
让footer固定在页面(视口)底部(CSS-Sticky-Footer) 这是一个让网站footer固定在浏览器(页面内容小于浏览器高度时)/页面底部的技巧.由HTML和CSS实现,没有令人讨厌的h ...
- sharepoint 2010 页面添加footer方法 custom footer for sharepoint 2010 master page
转:http://blog.csdn.net/chenxinxian/article/details/8720893 在sharepoint 2010的页面中,我们发现,没有页尾,如果我们需要给页面添 ...
随机推荐
- github上的版本和本地版本冲突的解决方法
勾选强制覆盖已有的分支(可能会丢失改动),再点击上传,上传成功. [master][~/Downloads/ios] git push -u origin master -f
- 【软件分析与挖掘】BOAT: An Experimental Platform for Researchers to Comparatively and Reproducibly Evaluate Bug Localization Techniques
摘要: 目前有许多的bug定位技术,但是,由于他们基于不同的数据集,而且有些数据集还不是公开的,甚至有些技术只应用于小数据集,不具有通用性,因此,不好比较这些技术之间的优劣. 因此,BOAT应运而生. ...
- 超实用的JavaScript技巧及最佳实践(下)
1.使用逻辑符号&&或者||进行条件判断 1 2 3 var foo = 10; foo == 10 && doSomething(); // is the same ...
- .NET 产品版权保护方案 (.NET源码加密保护) (转载)
说 明:你希望自己用.net辛辛苦苦做出来的软件被人轻易破解吗?你希望自己花了大量人力物力用.net开发出来的产品被竞争对手轻易获取核心代码吗?这是 一篇比较详尽地介绍如何保护自己的.net源代码的文 ...
- python——第二天
类和实例: 创建实例是通过类名+()实现 但是!可以自由地给每个实例变量绑定新的属性(特指以前在类定义中没有的属性) __init__方法用来给类定义必要的几个属性,第一个参数永远是self type ...
- Android学习笔记之SoftReference软引用...
PS:其实这一篇和上一篇很类似,都是为了解决内存不足(OOM)这种情况的发生... 学习内容: 1.对象的引用类.... 最近也是通过项目中知道了一些东西,涉及到了对象的引用类,对象的引用类分为多 ...
- SQL Server里等待统计(Wait Statistics)介绍
在今天的文章里我想详细谈下SQL Server里的统计等待(Wait Statistics),还有她们如何帮助你立即为什么你的SQL Server当前很慢.一提到性能调优,对我来说统计等待是SQL S ...
- 黑客入门之IP地址及常用命令
在网络上,只要利用IP地址就可以找到目标主机,因此,如果黑客想要攻击某个网络主机,就要先确定该目标主机的域名或IP地址. IP地址概述 所谓IP地址就是一种主机编址方式,给每个连接在Internet上 ...
- “康园圈--互联网+校园平台“项目之sprint1总结
一.团队成员 梁植淋,官郅豪,纪焓,詹耀海 二.目前进度 在全体组员的努力下,目前完成了项目的<设计方案书>.<功能需求书>.框架搭建.项目部署文档. 并成 ...
- Qt Style Sheet实践(三):QCheckBox和QRadioButton
导读 单选按钮(QRadioButton)和复选框(QCheckBox)是界面设计中的重要元素.单选按钮只允许用户在一组选项中选择一个,且当其中一个被选中的时候,按钮组中的其他单选按钮自动取消.复选框 ...