Einzelnen Beitrag anzeigen
  #4 (permalink)  
Alt 04.04.2014, 13:18
Benutzerbild von Manfred62
Manfred62 Manfred62 ist offline
Erfahrener Benutzer
XHTMLforum-Kenner
 
Registriert seit: 18.09.2009
Ort: Ludwigsburg
Beiträge: 2.134
Manfred62 ist einfach richtig nettManfred62 ist einfach richtig nettManfred62 ist einfach richtig nettManfred62 ist einfach richtig nettManfred62 ist einfach richtig nett
Standard

z.B. so gehts (Quelle):
HTML-Code:
<!DOCTYPE html>
<html lang="de">
<head>
	<meta charset="UTF-8">
	<title>Test</title>
	<style type="text/css">
	* {
		margin: 0;
		padding: 0;
	}
	body {
		font: 100%/1.6 sans-serif;
		color: #fff;
	}
	.test {
		font-size: 3em;
		background: #4d4d4d;
		margin: 300px 0 0 170px;
		width: 250px;
		height: 140px;
	}
	.test p {
		text-align: center;
		position: relative;
		top: 50%;
		transform: translateY(-50%);
	}
	</style>
</head>
<body>
	<div class="test">
		<p>Test</p>
	</div>
</body>
</html>
Mit Zitat antworten