Seite 1 von 1

Frage zu CSS-Positionierung

Verfasst: 20.03.2006 19:46
von |SONY|
hallo zusammen,

vorab um diese seite geht es speziell der head bereich:

www.brasilguide.de

hier möchte ich im head bereich insgesamt drei div container positionieren. (bisher zwei):
das problem fängt an bei der ausrichtung von #headright der genau wie der left head bereich nicht links sondern rechts aussen positioniert werden soll. was ich bisher rausfinden konnte ist, dass es dem float liegt ! aber test hin und her ich bekomme es nicht hn ein logo links eines rechts zu positionieren ?

würde mich freuen wenn ihr mit tipps geben könnt nochdazu wo ich dann zwischen den left und right divs ein center div bereich im head definieren möchte.

Code: Alles auswählen

		<div id="head">
		  <div id="headleft"><img src="br_left.jpg"></div>
		  <div id="headright"><img src="br_right.jpg"></div>
		</div>

Code: Alles auswählen

			#headleft {
				margin-top:auto;
				margin-bottom:0px;
				margin-right:auto;
				width: 145px;
				height: 80px;
				float:left;
				border-left:2px solid #BABABC;
				border-top:2px solid #BABABC;
				border-right:2px solid #696C71;
				border-bottom:2px solid #696C71;
				background-color: #0E234C;
			}
			#headright {
				margin-top:0px;
				margin-bottom:auto;
				margin-right:0px;
				width: 145px;
				height: 80px;
				border-left:2px solid #BABABC;
				border-top:2px solid #BABABC;
				border-right:2px solid #696C71;
				border-bottom:2px solid #696C71;
				background-color: #0E234C;
			}

Verfasst: 20.03.2006 20:53
von S2B
Ein einfaches Beispiel (ohne den ganzen zusätzlichen Code von dir):

Code: Alles auswählen

#left {
  float: left;
  width: 50%
}

#right {
  margin-left: 50%;
  text-align: right
}
und das HTML dazu:

Code: Alles auswählen

<div>
  <div id="left"><img src="deinBild.jpg" alt="" /></div>
  <div id="right"><img src="deinBild.jpg" alt="" /></div>
  <!-- eventuell hier noch das: -->
  <div style="clear: left"></div>
</div>