├── .gitignore ├── LICENSE ├── README.md ├── floaty.css ├── floaty.svg ├── index.html ├── logo.png └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | .DS_Store 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | 11 | # Runtime data 12 | pids 13 | *.pid 14 | *.seed 15 | *.pid.lock 16 | 17 | # Directory for instrumented libs generated by jscoverage/JSCover 18 | lib-cov 19 | 20 | # Coverage directory used by tools like istanbul 21 | coverage 22 | 23 | # nyc test coverage 24 | .nyc_output 25 | 26 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 27 | .grunt 28 | 29 | # Bower dependency directory (https://bower.io/) 30 | bower_components 31 | 32 | # node-waf configuration 33 | .lock-wscript 34 | 35 | # Compiled binary addons (https://nodejs.org/api/addons.html) 36 | build/Release 37 | 38 | # Dependency directories 39 | node_modules/ 40 | jspm_packages/ 41 | 42 | # TypeScript v1 declaration files 43 | typings/ 44 | 45 | # Optional npm cache directory 46 | .npm 47 | 48 | # Optional eslint cache 49 | .eslintcache 50 | 51 | # Optional REPL history 52 | .node_repl_history 53 | 54 | # Output of 'npm pack' 55 | *.tgz 56 | 57 | # Yarn Integrity file 58 | .yarn-integrity 59 | 60 | # dotenv environment variables file 61 | .env 62 | 63 | # next.js build output 64 | .next 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Vladimir Carrer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Gzip Size](https://img.badgesize.io/https://unpkg.com/floatycss@1.0.0/floaty.css?compression=gzip)](https://unpkg.com/floatycss@1.0.0/floaty.css) 2 | 3 |

4 | 5 |

Floaty

6 | 7 |

Solution for all the web designers who need to support the older browsers.

8 | 9 |
10 | 11 |

Floaty is 0,6 Kb(0,35 Kb gzip) CSS layout solution with basic responsive layout and will work even in the older browsers.

12 | 13 |

14 | I made 5 CSS layout solutions based on Flex and CSS GRID (SMART CSS GRID, 60 GS, Flexy, Katana, Flex One) this year and most common question is: will it work in IE. 15 | The answers is: not always. 16 |

17 | 18 |

Floats were never meant to be used as layout solution but I think still 90% of all the web uses floats probably of the simplicity, fear of browser un-compatibility and web designers / developers need to learn more complex layout systems like Flex or CSS Grid.

19 | 20 |

With floats you can go left or right, anyone can learn that.

21 | 22 |

Flex and CSS Grid are first real layout solutions and if possible we should always push the web forward.

23 | 24 |

But if for some reason you still want to "go with the float", this solution may help you.

25 | 26 |

Installation

27 | 28 |

Just simply download the project or:

29 | 30 | 31 | ```shell 32 | $ npm i floatycss 33 | ``` 34 | 35 | ```html 36 | 37 | ``` 38 | 39 | Demo: https://vladocar.github.io/floaty/ 40 | 41 |

License

42 | 43 | This project is licensed under the MIT License 44 | -------------------------------------------------------------------------------- /floaty.css: -------------------------------------------------------------------------------- 1 | 2 | *{box-sizing: border-box} 3 | 4 | .main {margin: 0 auto; width: 80%} 5 | 6 | .p10,.p12,.p17,.p20,.p25,.p30,.p33,.p40,.p50,.p60,.p67,.p70,.p75,.p80,.p83,.p100{float:left; 7 | padding: 0 15px} 8 | 9 | .p10{width:10%} 10 | .p12{width:12.5%} 11 | .p17{width:16.6667%} 12 | .p20{width:20%} 13 | .p30{width:30%} 14 | .p25{width:25%} 15 | .p33{width:33.3334%} 16 | .p40{width:40%} 17 | .p50{width:50%} 18 | .p60{width:60%} 19 | .p67{width:66.6667%} 20 | .p70{width:70%} 21 | .p75{width:75%} 22 | .p80{width:80%} 23 | .p83{width:83.3334%} 24 | .p100{width:100%} 25 | 26 | 27 | .clear{width: 100%; clear: both;} 28 | .nomargin{padding:0 ! important; margin:0 !important} 29 | 30 | @media all and (max-width: 600px) { 31 | .main{width:98% !important; margin: 0 auto} 32 | .p10,.p12,.p17,.p20,.p25,.p33,.p40,.p50,.p60,.p67,.p75,.p80,.p83,.p100 {width:100%} 33 | img{max-width:100%;height:auto} 34 | } 35 | -------------------------------------------------------------------------------- /floaty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 16 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 69 | 70 | 71 | 75 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 89 | 90 | 91 | 95 | 97 | 99 | 101 | 102 | 103 | 127 | 139 | 154 | 173 | 191 | 215 | 219 | 232 | 263 | 264 | 265 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Floaty 10 | 49 | 50 | 51 | 52 |
53 | 54 |
55 | 56 | 57 | 58 |
59 |

Floaty - CSS Float Based Layout System

60 |
Minimal CSS Float Layout
61 | 62 |
50%
63 |
50%
64 | 65 |
33,3%
66 |
33,3%
67 |
33,3%
68 | 69 |
25%
70 |
25%
71 |
25%
72 |
25%
73 | 74 |
20%
75 |
20%
76 |
20%
77 |
20%
78 |
20%
79 | 80 |
16,66%
81 |
16,66%
82 |
16,66%
83 |
16,66%
84 |
16,66%
85 |
16,66%
86 | 87 | 88 |
12,5%
89 |
12,5%
90 |
12,5%
91 |
12,5%
92 |
12,5%
93 |
12,5%
94 |
12,5%
95 |
12,5%
96 | 97 | 98 |
17%
99 |
83%
100 | 101 | 102 |
50%
103 |
25%
104 |
25%
105 | 106 | 107 |
Solution for all the web designers who need to support the older browsers.
108 | 109 | 110 | 111 | 112 | 113 | 114 |
115 |
116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vladocar/floaty/c9ee2a88ae0c3d318d9c3b16123cddca34533225/logo.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "floatycss", 3 | "version": "1.0.0", 4 | "description": "CSS Layout Solution", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/vladocar/floaty.git" 12 | }, 13 | "keywords": [ 14 | "css", 15 | "html" 16 | ], 17 | "author": "Vladimir Carrer (http://www.vcarrer.com)", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/vladocar/floaty/issues" 21 | }, 22 | "homepage": "https://github.com/vladocar/floaty#readme" 23 | } 24 | --------------------------------------------------------------------------------