en dat alles ook nog verticaal gecentreerd?quote:Op donderdag 19 mei 2005 17:29 schreef DionysuZ het volgende:
er is dus geen enkele css mogelijkheid om een DIV een hoogte van 100% te geven met een minimale hoogte van x pixels?
1 2 3 4 5 | <div id="container"> <div id="alignment"> .... </div> </div> |
1 2 3 4 5 6 7 8 9 10 11 12 | #container { height: 100%; min-height: 520px; } #alignment { position: absolute; left: 50%; top: 50%; margin-top: -260px; margin-left: -370px; } |
1 2 3 4 5 6 7 8 9 | ------------------------ ______ | p | | a | | g | |__e__| ------------------------ |
1 2 3 4 | ------------------------ | a | | g | ------------------------ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Voorbeeldje</title> <style type="text/css"> body, html { height: 100%; margin: 0; padding: 0; } #alignment { position: relative; height: 100%; width: 100%; margin: 0; padding: 0; min-height: 522px; /* IE Hack */ _height: 522px; } #container { position: absolute; background: #ff0000; border: 1px solid #000000; left: 50%; top: 50%; width: 760px; height: 522px; margin: 0px auto; margin-left: -380px; margin-top: -261px; text-align: center; color: #ffffff; } </style> </head> <body> <div id="alignment"> <div id="container"> Nu werkt het goed in Firefox, maar niet in IE. </div> </div> </body> </html> |
2 dingen:quote:Op donderdag 19 mei 2005 19:18 schreef DionysuZ het volgende:
Had op google gezocht en daar stond dat _height een IE hack was voor min-height, maar het werkt dus niet.
1 2 3 | height: 100%;/* FF */ min-height: 250px;/* FF */ _height: expression(document.body.clientHeight < 250 ? "250px" : "100%");/* IE */ |
1 2 3 4 5 6 | a#menuitem1 { background-image : url(menu/test.gif); } a#menuitem1:hover { background-image : url(menu/test_selected.gif); } |
1 2 3 4 5 6 7 8 | a#menuitem1 { background-image : url(menu/test.gif); background-position: -100px 0; } a#menuitem1:hover { background-image : url(menu/test.gif); background-position: 0 0; } |
1 2 3 4 5 | <ol> <li>listitem 1</li> <li>listitem 2</li> <li>listitem 3</li> </ol> |
1 2 3 | 1. listitem 1 2. listitem 2 3. listitem 3 |
1 2 3 | 1 listitem 1 2 listitem 2 3 listitem 3 |
Er is een ordered list (ol) en een unordered list (ul)quote:
1 2 3 | OL { counter-reset: item } LI { display: block } LI:before { content: counter(item) ". "; counter-increment: item } |
Forum Opties | |
---|---|
Forumhop: | |
Hop naar: |