Suche im Forum:
Suchen


Autor Nachricht
Beitrag04.09.2009 um 22:08 (UTC)    
Titel: Design CSS : Rechte Box soll auf das Textfeld

hallo,

ich wollte mal fragen, wie ich die rechte box auf content bekomm

Zitat:
-->
</style>
<center>
<style type="text/css">
<!--

td[height="102"] {
position:absolute;
left:50%;
margin-left:-384px; }

body {
background-color: #000000;
background-image:url();
text-align:center; }


#Hintergrund {
margin:0px;
width: 970px;
padding-bottom:20px;
margin-bottom:20px;
text-align:center;
background-color:#5e0004;
background-image:url();
border:2px solid #FFFFFF; }


/* Feld der Navigation */
#nav_container {
float:left;
width:100%;
margin-left:20px;
margin-top:20px;
margin-bottom:15px;
background-image:url();
border:0px solid #FFFFFF; }

/* Titel der Navigation entfernt mit */
#nav_heading {
display:none; }

ul#nav {
margin:0px;
padding:0px; }

/* Hintergrund der Navi-Links */
li.nav_element {
float:left;
position: relative;
list-style-type: none;
width:185px;
padding:10px 0px 2px 0px;
margin-right:10px;
margin-bottom:5px;
background-color:#;
background-image:url(http://img.webme.com/pic/t/tgw-hilfe/button5.png);
border:1px solid #; }

/* Textlinks Navigation */
li.nav_element a {
display:inline;
color: #000000;
font-size:13px;
font-family:arial;
font-weight: bold;
text-decoration: none; }


#content {
float:center;
height: 300px;
width: 900px;
background: #F2F2E6;
color: #000000;
border: 0px solid #CCCCCC;
margin: 0px 0px 0px 0px;
padding: 10px;
overflow:auto;}


/* Seitentitel und Titel rechte Box */
h2#title , #sidebar_heading {
margin-bottom:10px;
padding:5px;
color:#FFFFFF;
font-size:14px;
font-family:arial;
background-color:#b8ab9c;
border:1px solid #3d2728; }


/* Rechte Box */
#sidebar_container {
float:left;
padding:15px 10px 10px 10px;
margin-left:10px;
margin-right:20px;
margin-bottom:10px;
width:200px;
background-color:#FFFFFF;
border:1px solid #002f2f; }


#header_container{display:none;}
#nav_heading {display:none;}
h1#header{display:none;}
#pre_content {display:none;}
#pre_header {display:none;}
#post_header {display:none;}
#post_content {display:none;}
#below_content {display:none;}
#extraDiv2 {display:none;}
#extraDiv3 {display:none;}
#extraDiv4 {display:none;}
#extraDiv5 {display:none;}
#extraDiv6 {display:none;}



also das is der bisherige code, iwie schaff ich das nich . . .
oder is das nich möglich?


Zuletzt bearbeitet von atomente am 05.09.2009, 09:17, insgesamt 2-mal bearbeitet
Beitrag05.09.2009 um 08:15 (UTC)    
Titel:

Hallo,

Du verwendest zum positionieren der Felder (Textfeld / Box / Navi u.s.w.)
das float:left; . Bekommt ein Feld float:left; , wird es links außen beginnen.
Felder ohne float:left; platzieren sich um das Feld herum ,
je nachdem wie breit sie sind rechts daneben, und sind sie zu breit ,
platzieren sie sich unter dem Feld .

So bekommst du natürlich die Box nicht AUF das Textfeld .
Dann musst du mit abosluter Positionierung arbeiten :

Zitat:

/*Rechte Box*/
#sidebar_container {
position: absolute;
top: XXXpx;
left: XXXpx;

padding:15px 10px 10px 10px;
width: 200px;
background-color:#FFFFFF;
border:1px solid #002f2f; }


Die Rechte Box benötigt dann kein margin im Code , kein float ,
weil sie sich nicht mehr an das gefloatete Feld orientiert, sondern
im Code eine feste Position bekommen hat .
Du musst bei top den Abstand von oben einfügen, und bei left den Anstand von linker Seite .

Und bei Fragen zum Thema Design ändern / anpassen :
Diese bitte in der Foren-Rubrik "CSS" (unten im Forum) stellen .
Und immer das eigene Design mit angeben, sonst muss jeder Helfer selber nachschauen Wink

Gruß Wolfgang
______________


Zuletzt bearbeitet von 24939 am 05.09.2009, 09:16, insgesamt einmal bearbeitet
Beiträge der letzten Zeit anzeigen:   


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de