This is a discussion on Scaling Divs (simply 2 rows) within the Coding Help forums, part of the Webmaster Help category; I know this is possible, but it is driving me mad. For example's sake, I have just 2 divs inside ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I know this is possible, but it is driving me mad. For example's sake, I have just 2 divs inside the body tag of a page. Both divs are to scale the full width of the body The first div is just 100px heigh The second div is to be placed underneath and consumes the remaining height of the body. So basically we have 2 rows, a) is 100px heigh, and b) is (body_height - 100px). Do I have to resort to using Javascript to get this working cross browser? or will CSS suffice? Can anyone offer a code example that works cross browser? I have looked for this online, but can't find exactly what I'm looking for. |
| |||||
| when you work with div height is very difficult to get it right due to user screen resolution and size. Best is to probably go for the "min-height" value in your css.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Car Parts & Accessories Car Parts :. Cars Ireland Cars Ireland :. I Have 2 Find It Directory SEF Directory |
| |||||
| This should work: HTML Code: <div style="width:100%; height:100px; overflow:hidden;"></div> <div style="width:100%; height:auto; float:left; clear:left;"></div> Use this handy service to test your code for cross-browser compatibility: Test your web design in different browsers - Browsershots
__________________ The cure for boredom is curiosity. There is no cure for curiosity - Dorothy Parker |
| Tags |
| divs, rows, scaling, simply |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Divs in Wordpress | paul | Blogs & Blogging | 2 | 16-05-2007 10:35 PM |
| CSS & Divs Problem | ziycon | Coding Help | 2 | 15-03-2007 04:25 PM |
| Divs, tables and design | ph3n0m | Webmaster Discussion | 9 | 01-04-2006 08:34 PM |
| ||||
| | ![]() | |||
| | ||||