Autor |
Nachricht |
chrikle
Threadersteller
Dabei seit: 02.05.2002
Ort: NRW
Alter: 47
Geschlecht:
|
Verfasst Do 03.03.2005 18:04
Titel [CSS] Anker als Block aber dann mittig?? |
|
|
Hallo!
Ich bräuchte mal ein wenig Hilfe.
Und zwar habe ich einen Aufbau, wo ich im Kopf LINKS als Blockelemente nebeneinander stelle.
Das funktioniert auch ganz super. Nur ist der Kopf 875 Pixel breit, aber die sch**** Viecher
verkrümeln sich andauernd in die linke Ecke. Aber ich will, das die zentriert im Kopf stehen.
Hier mal der Seiten-Code:
Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Unbenanntes Dokument</title>
<link href="stadler.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="Container">
<div id="Kopf">
<a href="#" class="HM">Punkt 01 </a>
<a href="#" class="HM">Punkt 02</a>
<a href="#" class="HM">
Punkt 03</a>
<a href="#" class="HM">Punkt 04</a> <a href="#" class="HM">
Punkt 05</a>
<a href="#" class="Abschluss">
</a>
</div>
</div>
</body>
</html>
|
Und hier mal das CSS:
Code: |
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
background-color: #000000;
text-align: center;
margin: 0px;
padding: 0px;
}
#Container {
margin-top: -265px;
margin-left: -440px;
position: absolute;
top: 50%;
left: 50%;
height: 525px;
width: 875px;
text-align: left;
overflow: hidden;
padding: 0px;
background-color: #CCCCCC;
}
#Kopf {
background-color: #666666;
text-align: center;
height: 35px;
width: auto;
overflow: hidden;
}
a.HM {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-transform: uppercase;
color: #FFFFFF;
text-decoration: none;
display: block;
margin: 9px 0px 0px;
padding: 5px 0px 0px;
height: 26px;
width: 140px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #FFFFFF;
font-weight: bold;
overflow: hidden;
text-align: center;
vertical-align: middle;
float: left;
background-color: #3366CC;
}
a.Abschluss {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
text-transform: uppercase;
color: #FFFFFF;
text-decoration: none;
margin: 9px 0px 0px;
padding: 5px 0px 0px;
height: 26px;
width: 2px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #FFFFFF;
font-weight: bold;
overflow: hidden;
float: left;
}
|
Hat jemand eine Idee, woran es denn liegt?
Wäre für jeden Tipp dazu dankbar.
Gruß
Chris
|
|
|
|
|
phalanx
Dabei seit: 07.09.2004
Ort: Coesfeld
Alter: 38
Geschlecht:
|
Verfasst Do 03.03.2005 19:45
Titel
|
|
|
versuch mal folgendes: Code: | [...]
#Kopf {
background-color: #666666;
text-align: center;
height: 35px;
width: 875px;
overflow: hidden;
}
[...] |
Zuletzt bearbeitet von phalanx am Do 03.03.2005 19:45, insgesamt 1-mal bearbeitet
|
|
|
|
|
Anzeige
|
|
|
chrikle
Threadersteller
Dabei seit: 02.05.2002
Ort: NRW
Alter: 47
Geschlecht:
|
Verfasst Do 03.03.2005 19:49
Titel
|
|
|
Danke phalanx, aber das bringt es auch nicht.
Aber ich habe das Problem auch schon gelöst
Da ich ja mit festen Breiten arbeite, habe ich einfach
dem Kopf Links und Rechts 82 Pixel Einzug gegeben.
Somit komme ich auf ca. 710 Pixel Breite, welche sich
im Container (875 Pixel) zentriert. *puh*
Aber trotzdem Danke!
Gruß
Chris
Zuletzt bearbeitet von chrikle am Do 03.03.2005 19:50, insgesamt 1-mal bearbeitet
|
|
|
|
|
|
|
|
Ähnliche Themen |
dynamischer scroll von anker zu anker
PDF-Anker?
Block- und Listenansicht
Probleme mit Anker
Anker-Markierungen
Anker- Problem im IE6 und IE7
|
|