Ú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
- HP Elite Dragonfly G3, érintőkijelző ,i5-1235U ,16GB RAM ,512GB SSD, gyári garancia 2026.10.17-ig
- PlayStation Portal (garanciális) + AJÁNDÉKOK, csere is
- Dell Latitude 9520 27% ÁFA , i7-1185G7 ,16GB RAM ,512GB SSD ,1 év garancia
- Lenovo ThinkPad X1 Carbon 9th, i5-1135G7 ,16GB RAM , 256GB SSD, 1 év garancia
- Realme GT7T 16/512Gb
- Bomba Ár! Fujitsu LifeBook S762 - i5-3GEN I 8GB I 320GB I DVDRW I 13,3" HD I DP I W10 I Garancia!
- Zebra ZP505 EPL hőpapíros címkenyomtató
- 8Gb DDR3L 1,35V 12800u 1600Mhz RAM-ok, több db
- HIBÁTLAN iPhone 12 Pro 256GB Graphite - 1 ÉV GARANCIA - Kártyafüggetlen, MS3283
- Bomba ár! Lenovo ThinkPad T470 - i5-G6 I 8GB I 256GB SSD I 14" FHD I HDMI I Cam I W10 I Garancia!
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest