- Samsung Galaxy A54 - türelemjáték
- Google Pixel topik
- Samsung Galaxy S23 és S23+ - ami belül van, az számít igazán
- Nothing Phone (2) - több, mint elsőre látszik
- Táncolni még nem tud, de stabilan áll az Android 17 a lábán
- Milyen okostelefont vegyek?
- Itt a Galaxy S26 széria: az Ultra fejlődött, a másik kettő alig
- Igazi csúcskészülék lett a Poco F7 Ultra
- Xiaomi 15 - kicsi telefon nagy energiával
- MIUI / HyperOS topik
Új hozzászólás Aktív témák
-
tildy
nagyúr
válasz
pumatom
#3511
üzenetére
cssel:
<style type="text/css">
#outer {height: 400px; overflow: hidden; position: relative; width: 100%;}
#outer[id] {display: table; position: static;}
#middle {position: absolute; top: 50%; width: 100%; text-align: center;} /* for explorer only*/
#middle[id] {display: table-cell; vertical-align: middle; position: static;}
#inner {position: relative; top: -50%; text-align: left;} /* for explorer only */
#inner {width: 200px; margin-left: auto; margin-right: auto;} /* for all browsers*/
/* optional: #inner[id] {position: static;} */
/* just format */
div.greenBorder {border: 1px solid green; background-color: ivory;}
</style>
</head>
<body>
<h1>Vertical and horizontal centering in valid CSS - Example</h1>
<div id="outer" class="greenBorder">
<div id="middle">
<div id="inner" class="greenBorder">
any text<br>
<b>any height, set width,</b><br>
any content, for example generated from DB<br>
everything is both vertically and horizontally centered<br>
</div>
</div>
</div>
Új hozzászólás Aktív témák
- Xcover 7 128/6
- 197 - Lenovo Legion Pro 5 (16IAX10) - Intel Core U7 255HX, RTX 5070 (ELKELT)
- AKCIÓ! AsRock H510M i5 11400 16GB DDR4 512GB SSD RX 6600 8GB Zalman T4 Plus ADATA 600W
- HIBÁTLAN iPhone 15 Pro 128GB Natural Titanium -1 ÉV GARANCIA - Kártyafüggetlen, MS4538
- Xiaomi Watch 2 2027.04.09-ig Garancia Beszámítás Házhozszállítás
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

