1. 100% width divs not spanning entire width of the browser in webkit. Even Body can not span the entire width of the  browser. 
So crazy.
There is a funny way to fix it: 
html { overflow-y: scroll; }

2.  When Div is 100% width, set padding: 20px. Then its actual width is bigger than 100%. Be careful!!!!

3. Book review:

>1. Margin collapsing
Margin collapsing only happens with the vertical margins of block boxes in the normal flow of the 
document. Margins between inline boxes, floated, or absolutely positioned boxes never collapse. 
 
>2. Inline boxes
Inline boxes are laid out in a line horizontally. Their horizontal spacing can be adjusted using 
horizontal padding, borders, and margins (see Figure 3-9). However, vertical padding, borders, 
and margins will have no effect on the height of an inline box. Similarly, setting an explicit height 
or width on an inline box will have no effect either. The horizontal box formed by a line is called a 
line box, and a line box will always be tall enough for all the line boxes it contains. There is 
another caveat, though—setting the line height can increase the height of this box. Because of 
these reasons, the only way you can alter the dimensions of an inline box is by changing the line 
height or horizontal borders, padding, or margins. 
 
>3. display: inline-block
Helpfully, CSS2.1 allows you to set the display property of an element to be inline-block. As 
the name suggests, this declaration makes the element line up horizontally as if it were an inline 
element. However, the contents  of the box behave as though the box were a block-level, 
including being able to explicitly set widths, heights, vertical margins, and padding. Historically, 
this property has been poorly supported; hence, it’s relative obscurity. Thankfully, inline-block is 
now supported by Firefox 3.0 and above, IE 8, and  the latest versions of Safari and Opera, so I 
think we are going to see inline-block being used to create more interesting layouts over the 
next few years.  
 
position: static, relative, absolute, fixed
>4. position: relative and absolute
The main problem people have with positioning is remembering which type of 
positioning is which. Relative positioning is “relative” to the element’s initial 
position in the flow of the document, whereas absolute positioning is “relative” 
to nearest positioned ancestor or, if one doesn’t exist, the initial container block.
 
>5. float
Because floated boxes aren’t in the normal flow of the document, block boxes in the regular flow 

of the document behave as if the floated box wasn’t there.

Study Tips的更多相关文章

  1. python及pandas,numpy等知识点技巧点学习笔记

    python和java,.net,php web平台交互最好使用web通信方式,不要使用Jypython,IronPython,这样的好处是能够保持程序模块化,解耦性好 python允许使用'''.. ...

  2. 【转载】《Learn More Study Less》整体性学习方法

    原文 忘记在哪里看到这本书的介绍了,据说是一个小子自学1年,完成了4年麻省理工的课程,然后写了一本他学习方法的书.我搜了一下,居然中英文版都有,就花时间好好读了一遍,就是这本. 以下是这本书的完整笔记 ...

  3. Free Professional Resume Examples and Writing Tips

    https://www.thebalancecareers.com/free-resume-examples-and-writing-tips-2063596 Do you need to write ...

  4. 科学论文写作 Tips

    感觉还是课程中给的英文描述会比较好,所以笔记大多数还是以老师的原英文 PPT 为主 1 Steps in the Writing Process 如何开展论文写作以及各个步骤的时间分配 1-1 Pre ...

  5. Mac上MySQL忘记root密码且没有权限的处理办法&workbench的一些tips (转)

    忘记Root密码肿么办 Mac上安装MySQL就不多说了,去mysql的官网上下载最新的mysql包以及workbench,先安装哪个影响都不大.如果你是第一次安装,在mysql安装完成之后,会弹出来 ...

  6. 【Tips】史上最全H1B问题合辑——保持H1B身份终级篇

    [Tips]史上最全H1B问题合辑——保持H1B身份终级篇 2015-04-10留学小助手留学小助手 留学小助手 微信号 liuxue_xiaozhushou 功能介绍 提供最真实全面的留学干货,帮您 ...

  7. layer.js中layer.tips

    <script src="~/Content/js/layer/layer.js"></script> layer.tips('名称不能为空', '#pro ...

  8. Improve Your Study Habits

    1.Plan your time carefully. Make a list of your weekly tasks.Then make a schedule or chart of your t ...

  9. HTML 最简单的tips 怎么支持指定DIV显示提示信息

    <body> <style type="text/css"> a.link{position:relative;} a.link div.tips{ bor ...

随机推荐

  1. C#读取物理网卡信息及其对应的IP地址

    using Microsoft.Win32; using System; using System.Collections; using System.Collections.Generic; usi ...

  2. CSS知识点-- Padding

    The CSS padding properties define the space between the element border and the element content. Padd ...

  3. libevent源码深度剖析

    原文地址: http://blog.csdn.net/sparkliang/article/details/4957667 第一章 1,前言 Libevent是一个轻量级的开源高性能网络库,使用者众多 ...

  4. 【转】How to resolve ORA-19706 error when select from dblink

    文章转自:http://www.dbform.com/html/2012/1846.html

  5. Sublime Text3 插件集合

    下载地址:http://download.csdn.net/detail/yinluhui/9029791 [包含的插件有: AndyJS2.BracketHighlighter.emmet-subl ...

  6. winform 指定浏览器打开链接

      Process myProcess = new Process();   myProcess.StartInfo.FileName = "firefox.exe";//&quo ...

  7. Linux高级编程--04.GDB调试程序(设置断点)

    调试已运行的程序 在UNIX下用ps查看正在运行的程序的PID(进程ID),然后用gdb PID格式挂接正在运行的程序. 先用gdb 关联上源代码,并进行gdb,在gdb中用attach命令来挂接进程 ...

  8. java trim

    rim方法一般用来去除空格,但是根据JDK API的说明,该方法并不仅仅是去除空格,它能够去除从编码’\u0000′ 至 ‘\u0020′ 的所有字符. 回车换行也在这20个字符之中,以下是一个示例: ...

  9. Tips6:用[HideInInspector]在Inspector中隐藏变量

    你曾想要把某些公有变量在Inspetor面板中隐藏起来吗,这样很简单就能做到. 让我们来看以下代码: using UnityEngine; public class HidingScript : Mo ...

  10. 解决msgfmt无法使用的问题

    参考: http://blog.sina.com.cn/s/blog_4fb490ff0100csne.html http://linux.die.net/man/1/msgfmt http://pa ...