Advertisement
decembre

CSS - COLUMN v.1

May 8th, 2016
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.71 KB | None | 0 0
  1. ============================
  2. ======== CSS - COLUMN v.1 - POSTé
  3. ============================
  4.  
  5. ========================================
  6. =========== SPLIT THE RESULTS BETWEEN THE TWO COLUMNS LIKE THIS?
  7. == http://forum.userstyles.org/discussion/35421/multi-column
  8. 1 2
  9. 3 4
  10. 5 6
  11. 7 8
  12.  
  13. Right now it is like this:
  14.  
  15. 1 5
  16. 2 6
  17. 3 7
  18. 4 8
  19.  
  20. == Yes. Replace the multi-column rules with this:
  21.  
  22. #results > UL > LI {
  23. width: -moz-calc(50% - 25px / 2) !important;
  24. width: -webkit-calc(50% - 25px / 2) !important;
  25. }
  26. #results > UL > LI:nth-child(odd) {
  27. float:left !important;
  28. clear:both !important;/**/
  29. margin-right: 25px !important;
  30. }
  31.  
  32. ========================================
  33. =========== -BREAK : always / - A LIRE - CSS3 MULTI-COLUMN THRILLER
  34. == http://www.stunningcss3.com/resources/links.html#links7
  35. == Deal-breaker problems with CSS3 multi-columns (with demo) ==http://zomigi.com/blog/deal-breaker-problems-with-css3-multi-columns/
  36. == http://www.stuffandnonsense.co.uk/archives/css3_multi-column_thriller.html
  37.  
  38. properties which determine where column breaks occur (for example above every <h3>),
  39. column-break-before : always
  40. column-break-inside : avoid
  41.  
  42. h1 { column-break-before : always }
  43. h2 { column-break-after : avoid }
  44. h1, h2 { column-break-before : always }
  45.  
  46. but these themselves could have unforseen design issues including the introduction of large amounts of additional white-space or uneven column lengths.
  47.  
  48.  
  49. ========================================
  50. =========== A LIRE - CSS Swag: Multi-Column Lists
  51. == http://alistapart.com/article/multicolumnlists
  52.  
  53. == Method 1: Floating list items:
  54. The essential CSS is brief:
  55.  
  56. /* allow room for 3 columns */
  57. ol {
  58. width: 30em;
  59. }
  60. /* float & allow room for the widest item */
  61. ol li {
  62. float: left;
  63. width: 10em;
  64. }
  65. /* stop the float */
  66. br {
  67. clear: left;
  68. }
  69. /* separate the list from subsequent markup */
  70. div.wrapper {
  71. margin-bottom: 1em;
  72. }
  73.  
  74. == Method 2: Numbering split lists with HTML attributes :
  75.  
  76. == Method 3: Numbering split lists with CSS generated content :
  77. ol li {
  78. list-style-type: none;
  79. }
  80. ol li:before {
  81. content: counter(item) ". ";
  82. counter-increment: item;
  83. }
  84.  
  85. == Wrapping a single list with CSS :
  86. == Method 5: Wrapping a single list using absolute positioning :
  87.  
  88. == METHOD 6: WRAPPING A SINGLE LIST USING NORMAL FLOW (Finally, here’s the technique I prefer to use):
  89.  
  90.  
  91.  
  92. ========================================
  93. =========== COLONNES (column)
  94. == (FR ) http://phollow.fr/2011/10/css-multi-columns/
  95. ==http://webdesign.about.com/od/css3/a/css3-multi-columns.htm
  96. ==http://webdesign.about.com/od/examples/l/bl-css3-multi-columns-examples.htm#threeColGap
  97. ==http://www.w3.org/TR/css3-multicol/
  98. ==http://www.w3.org/TR/css3-multicol/#cw
  99. ==http://www.netmagazine.com/tutorials/css3-tips
  100.  
  101.  
  102. =====================
  103. Il y a 2 façons de créer des colonnes :
  104. - Spécifier un nombre fixe de colonnes à l'aide de la propriété column-count.
  105. - Spécifier la largeur des colonnes à l'aide de column-width (pixels ou ems, mais pas de pourcentage…).
  106. Les 2 propriétés peuvent être cumulées,
  107. mais le navigateur choisira l'une ou l'autre suivant les cas.
  108.  
  109. Il existe bien sur d'autre propriétés :
  110. Gérer l'espacement entres les colonnes :
  111. - column-gap
  112.  
  113. Gérer l'apparence de la séparation des colonnes :
  114. - column-rule
  115. - column-rule-width
  116. - column-rule-style
  117. - column-rule-color
  118. Forcer le passage d'un élément sur la colonne suivante. Plus d'infos sur le site du w3c :
  119. - break-before
  120. - break-after
  121. - break-inside
  122. =====================
  123. ==== The multi-column model
  124. ==http://kmsm.ca/2010/an-almost-complete-guide-to-css3-multi-column-layouts/
  125.  
  126. Multi-column element needs to have either a defined column width or column count.
  127. Browsers are supposed to render these elements similar to the way they render tables –
  128. but the content in a column layout is dynamically split into blocks.
  129.  
  130. At the moment, we’re not able to define certain properties about columns (like column-specific backgrounds),
  131. but it’s possible this might change.
  132. - Number and width of columns
  133.  
  134. column-count
  135. column-width
  136.  
  137. - column-count :
  138. By default, column-count is set to auto.
  139. This means that if we explicitly define the column-width,
  140. the browser will sort out for itself how many columns are necessary to populate
  141. the content in the multi-column element. Obviously, that’s not always desirable so
  142. we’ll want to explicitly define the number of columns to span the content across.
  143. And it’s easy to do:
  144.  
  145. #multicolumnElement {
  146. -webkit-column-count: 2;
  147. -moz-column-count: 2;
  148. column-count: 2;
  149. }
  150.  
  151. - column-width :
  152. We can define column-width without defining the number of columns,
  153. and the browser will render our content dynamically (there are some fine controls available too
  154. – keep reading for those).
  155. To define column-width, we can use any of the units regularly available to CSS properties (em, px, %, etc).
  156.  
  157. #multicolumnElement {
  158. -webkit-column-width: 15em;
  159. -moz-column-count: 15em;
  160. column-count: 15em;
  161. }
  162.  
  163. - Combine column-width and column-count:
  164. #multicolumnElement {
  165. -webkit-column-count: 2;
  166. -moz-column-count: 2;
  167. column-count: 2;
  168. -webkit-column-width: 15em;
  169. -moz-column-width: 15em;
  170. column-width: 15em;
  171. }
  172.  
  173. - Spanning columns :column-span
  174. If we want an element, say a headline, to span across multiple columns we can make use of the new column-span property.
  175.  
  176. column-span has 2 possible values:
  177. - all
  178. - regular numbers (e.g. 1,2,3).
  179. Defining column-span as all means that the given element will span across
  180. the whole multi-column block, while assigning it a regular number will limit its span to that number of columns:
  181.  
  182. h2 {
  183. -webkit-column-span:all;
  184. -moz-column-span:all;
  185. column-span:all;
  186. }
  187.  
  188. h3{
  189. -webkit-column-span:2;
  190. -moz-column-span:2;
  191. column-span:2;
  192. }
  193.  
  194. - Filling columns :column-fill (firebug dit pas valide???)
  195. Some finer control over how columns are filled with content.
  196. We can either define 2 values :
  197. - auto
  198. - balanced.
  199. The former will sequentially fill columns with content,
  200. while the latter evenly distributes the content.
  201.  
  202. #multicolumnElement {
  203. -webkit-column-fill:auto;
  204. -moz-column-fill:auto;
  205. column-fill:auto;
  206. }
  207.  
  208.  
  209. =====================
  210. ==== Column breaks
  211. ==http://kmsm.ca/2010/an-almost-complete-guide-to-css3-multi-column-layouts/
  212. What if I want to break the column before an h3 tag, you ask?
  213. Well, that’s easy too.
  214. CSS3 gives us the column-break property with a number of possible related properties and values,
  215. including:
  216. auto, always, avoid, left, right, page, column, avoid-page, and avoid-column.
  217. column-break
  218. So if we want to break the content before every h3 tag
  219. we simply include the column-break-before property in our stylesheet:
  220.  
  221. h2 {
  222. -webkit-column-break-before:always;
  223. -moz-column-break-before:always;
  224. column-break-before:always;
  225. }
  226.  
  227. ==== COLUMUN : break-after / break-inside
  228. == https://developer.mozilla.org/en-US/docs/CSS/break-before
  229. == http://www.quackit.com/css/css3/properties/css_break-inside.cfm
  230. ==https://www.google.com/search?num=100&hl=en&safe=off&client=firefox-a&hs=8fG&tbo=d&rls=org.mozilla%3Afr%3Aofficial&q=column-rule+break-before&oq=column-rule+break-before&gs_l=serp.3...1291790.1293071.0.1293588.2.2.0.0.0.0.360.466.0j1j0j1.2.0.les%3B..0.0...1c.1.kBLQNSSuz4M
  231. =====================
  232. CSS break-after :
  233. Allows you to force a break on multi-column layouts.
  234. More specifically, it allows you to force a break after an element.
  235. It allows you to determine if a break should occur, and what type of break it should be.
  236.  
  237. Syntax: break-before: auto | always | avoid | left | right | page | column | avoid-page | avoid-column;
  238. Example :
  239.  
  240. break-after: column; /* W3C */
  241. -webkit-column-break-after: column; /* Safari & Chrome */
  242. -moz-column-break-after: column; /* Firefox */
  243. -ms-column-break-after: column; /* Internet Explorer */
  244. -o-column-break-after: column; /* Opera */
  245. =====================
  246. CSS break-inside :
  247. Allows you to prevent an unwanted break within a multi-column layout.
  248. For example, when working with multi-column layouts, you might prefer ordered lists to display within one column
  249. (instead of spilling over to the next column part-way through the list).
  250. In this case, you could use the break-inside property to avoid this unwanted break.
  251.  
  252. Syntax: break-inside: auto | avoid | avoid-page | avoid-column;
  253. Example
  254.  
  255. break-inside: avoid; /* W3C */
  256. -webkit-column-break-inside: avoid; /* Safari & Chrome */
  257. -moz-column-break-inside: avoid; /* Firefox */
  258. -ms-column-break-inside: avoid; /* Internet Explorer */
  259. -o-column-break-inside: avoid; /* Opera */
  260.  
  261.  
  262. =====================
  263. ==column-count :
  264. Définit le nombre de colonnes
  265. -moz-column-count: 2;
  266. -webkit-column-count: 2;
  267. column-count: 2;
  268. =====================
  269. ==column-width :
  270. Définit la largeur de chaque colonne(Defines the width of each column)
  271. -moz-column-width: 100px;
  272. -webkit-column-width: 100px;
  273. column-width: 100px;
  274. =====================
  275. ==column-min-width :
  276. Définit la largeur minimale de chaque colonne (Defines the minimum width of each column)
  277. =====================
  278. ==column-width-policy :
  279. Définit si la largeur des colonnes sont souples ou strictes quand il ya un espace supplémentaire
  280. =====================
  281. ==column-gap :
  282. Définit la largeur de l'espace entre les colonnes
  283. -moz-column-gap: 30px;
  284. -webkit-column-gap: 30px;
  285. column-gap: 30px;
  286. =====================
  287. ==column-rule :
  288. Définit la largeur, le style et la couleur de la ligne entre les colonnes
  289. =====================
  290. ==column-rule-color :
  291. Définit la couleur de la ligne entre les colonnes
  292. =====================
  293. ==column-rule-style :
  294. Définit le style (solide, en pointillé, en pointillé, etc) de la ligne entre les colonnes
  295. -moz-column-rule: 1px solid black;
  296. -webkit-column-rule: 1px solid black;
  297. column-rule: 1px solid black;
  298. =====================
  299. ==column-rule-width :
  300. Définit la largeur de la ligne entre les colonnes
  301. =====================
  302. ==column-span :
  303. Définit le nombre de colonnes qu'un élément put chapeauter
  304. (Defines the number of columns an element inside the colmns should span )
  305. -moz-column-span: 3;
  306. -webkit-column-span: 3;
  307. column-span: 3;
  308. ============================
  309. =========== COLONNES (column) === -moz-column-rule
  310. == https://developer.mozilla.org/en/CSS/-moz-column-rule
  311. ============================
  312. =========== COLONNES - page break after
  313. ==http://www.w3schools.com/cssref/pr_print_pageba.asp
  314. Value Description
  315. auto Default. Insert a page break after the element if necessary
  316. always Insert a page break after the element
  317. avoid Avoid inserting a page break after the element
  318. left Insert page breaks after the element until it reaches a blank left page
  319. right Insert page breaks after the element until it reaches a blank right page
  320. inherit Specifies that the value of the page-break-after property should be inherited from the parent element
  321. ============================
  322. =========== COLONNES - SCROLL - overflow x/y
  323. ==http://webdesign.about.com/sitesearch.htm?q=overflow-y&SUName=webdesign
  324. overflow-x: hidden !important;
  325. overflow-y: scroll !important;
  326. ============================
  327. =========== COLONNES - display:table-cell
  328. COLONNES même hauteur.
  329. ==http://www.blog-and-blues.org/weblog/2004/09/24/304-des-colonnes-de-meme-hauteurs-en-css
  330. ==http://www.test.blog-and-blues.org/colonnes/trois/
  331. ==http://forum.alsacreations.com/topic.php?fid=4&tid=5623&p=1
  332. ============================
  333. =========== COLONNES - Vendors === -Webkit-column....
  334. Si la liste a une demi-douzaine d'articles ou plus, vous serez bientôt perdre beaucoup d'espace sur l'écran.
  335. Mais appliquer une classe à la liste et d'utiliser les CSS suivante et la liste s'affichera sur deux colonnes:
  336. . TwoColumnList {
  337. width: 40em;
  338. -webkit-column-count: 2;
  339. -webkit-column-gap: 1em;
  340. -moz-column-count: 2;
  341. -moz-column-gap: 1em;
  342. }
  343. Une largeur est définie et la colonne de comptage et column-gap automatiquement des propriétés diviser l'espace
  344. et la position éléments de la liste. Notez que les préfixes-webkit-et-moz-sont utilisés ici. À long terme,
  345. ils seront abandonnés; actuellement, cependant, ils sont tenus de faire ces propriétés dans Safari et Firefox respectivement.
  346.  
  347.  
  348. ============================
  349. =========== COLONNES - COLUMN : -moz-column-count / -moz-column-gap / -moz-column-width
  350. == exemple perso IAFAD :
  351. #ps dl {
  352. -moz-column-count: 5 !important;
  353. -moz-column-gap: 24px !important;
  354. -moz-column-width: 250px !important;
  355. display: inline-block !important;
  356. font-size: 0.75em !important;
  357. height: 670px !important;
  358. overflow-y: scroll;
  359. width: 1900px !important;
  360. }
  361.  
  362. ============================
  363. =========== COLONNES - COLUMN : -moz-column-count / -moz-column-gap / -moz-column-width / -moz-column-rule / -moz-column-span
  364. #comments {
  365. -moz-column-gap: 24px !important;
  366. -moz-column-width: 350px !important;
  367. display: inline-block !important;
  368. font-size: 0.75em !important;
  369. height: 350px !important;
  370. overflow-y: scroll;
  371. width: 1000px !important;
  372. }
  373.  
  374. ============================
  375. =========== /* FAVORITES - "BY OTHER" - THUMBNAILS Columns - === */
  376. #faves-right>ul{
  377. -moz-column-gap: 30px !important;
  378. -moz-column-rule-style: solid !important;
  379. -moz-column-rule-width: 2px !important;
  380. -moz-column-width: 573px !important;
  381. display: block !important;
  382. height: 700px !important;
  383. margin-top: -50px !important;
  384. overflow: hidden !important;
  385. width: 1850px !important;
  386. }
  387. #faves-right>ul{
  388. -webkit-columns-gap: 30px !important;
  389. -webkit-columns-rule-style: solid !important;
  390. -webkit-columns-rule-width: 2px !important;
  391. -webkit-columns-width: 573px !important;
  392. }
  393.  
  394.  
  395. ============================
  396. =========== /* POOL - MEMBERS LIST (/admin/members/) + BANNED (/admin/banned/) - 2/3 Columns - === */
  397. #MemberList>tbody {
  398. -moz-column-gap: 2px !important;
  399. -moz-column-rule-style: solid !important;
  400. -moz-column-rule-width: 2px !important;
  401. margin-left:-650px !important;
  402. display: block !important;
  403. height: 450px !important;
  404. margin-top: 75px !important;
  405. overflow: hidden !important;
  406. width: 1750px !important;
  407. -moz-column-width:600px !important;
  408. }
  409.  
  410.  
  411. ============================
  412. =========== /* INVITE - COLUMN - CONTACTS -
  413. -moz-column-count: 10 !important;
  414. === */
  415. #Main>table>tbody>tr>td>form>table>tbody>tr:nth-child(6) td {
  416.  
  417. -moz-column-width:250px !important;
  418. -moz-column-gap: 2px !important;
  419. -moz-column-rule-style: solid !important;
  420. -moz-column-rule-width: 2px !important;
  421. margin-left:-450px !important;
  422. display: block !important;
  423. height: 800px !important;
  424. margin-top: 15px !important;
  425. overflow: hidden !important;
  426. overflow-y: scroll !important;
  427. overflow-x: scroll !important;
  428. width: 1850px !important;
  429. margin-right:-300px !important;
  430. }
  431.  
  432.  
  433.  
  434. ============================
  435. ======= FLICKR - COMMENTS COLUMNS (test 1) ==== */
  436.  
  437. /* Correspondance px / en (font-size default : 16px) ==
  438. 500px = 31.250em
  439. 250px = 15.625em
  440. 250px = 18.750em
  441. AVEC em online - tool : http://riddle.pl/emcalc/ === */
  442.  
  443.  
  444. /* ============ -
  445. #primary-column #invites-and-comments #comments
  446. #invites-and-comments
  447. #photo-activity
  448.  
  449. outline : red solid 1px !important;
  450.  
  451. -moz-column-width: 573px !important;
  452. -webkit-columns-width: 573px !important;
  453.  
  454. width: 95em !important;
  455. width : 1110px !important;
  456. width: 95em !important;
  457. height: 50em !important;
  458. height :900px !important;
  459. float : left !important;
  460. z-index : 9500 !important;
  461. === */
  462. ========================================
  463. ====== COLUMN - COMMENTS LIST - FLICKR
  464. #photo-activity {
  465. -moz-column-count: 2 !important;
  466. -webkit-column-count: 2 !important;
  467.  
  468. -moz-column-gap: 5em !important;
  469. -webkit-column-gap: 5em !important;
  470.  
  471. -moz-column-rule-style: solid !important;
  472. -webkit-columns-rule-style: solid !important;
  473.  
  474. -moz-column-rule-width: 2px !important;
  475. -webkit-columns-rule-width: 2px !important;
  476.  
  477. overflow:hidden !important;
  478. overflow-x:hidden !important;
  479. overflow-y:hidden !important;
  480.  
  481. display : block !important;
  482. position:relative !important;
  483.  
  484. width: 95em !important;
  485. min-height : 500px !important;
  486. margin-left : -70px !important;
  487. padding-left : 40px !important;
  488. padding-right : 30px !important;
  489. padding-top : 40px !important;
  490. outline : grey solid 1px !important;
  491. }
  492. /* PHOTO PAGE - COMMENTS LIST - COLUMNS - FIRST ELEMENT (SPACE For "ADD COMMENT" -
  493. outline : yellow solid 1px !important;
  494. === */
  495. #comments li:first-of-type {
  496. margin-top :140px !important;
  497. position : relative !important;
  498. }
  499.  
  500.  
  501. ========================================
  502. /* COPY TWEAK - FAVORITES in COMMENTS - pour future place REPLY - === */
  503. #comments li.fave-block {
  504. margin-top : 200px !important;
  505. margin-bottom : 20px !important;
  506. top: -11px !important;
  507. width: 443px !important;
  508. left:-35px !important;
  509. }
  510.  
  511. /* COPY TWEAK - COMMENTS-SIDE - SCRIPT - "Quick Comment" And "Move Comment Form UP" - === */
  512. .comment-block.add-comment-form.adding-comment{
  513. left: -57px !important;
  514. top: 110px !important;
  515.  
  516. margin: 0 0 -11px -20px !important;
  517. min-height: 56px !important;
  518. }
  519. #comments .adding-comment textarea {
  520. min-height: 70px !important;
  521. margin-bottom: -18px !important;
  522. margin-top: -10px !important;
  523. width: 470px !important;
  524. position:relative !important;
  525. }
  526. #comments div.comment-block .comment-icon {
  527. margin-top: 13px !important;
  528. }
  529. /* copy SUPP (?) -
  530. #photo-activity {
  531. position:relative !important;
  532. top: 40px !important;
  533. display:block !important;
  534. margin-bottom:100px !important;
  535. } === */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement