katzenfreundin
Threadersteller
Dabei seit: 28.02.2010
Ort: -
Alter: -
Geschlecht: -
|
Verfasst So 28.02.2010 21:01
Titel <p> mit Abstandswerten verschiebt div |
|
|
Hallihallo,
hoffe ihr könnt mir helfen.
Mein Problem:
Habe ein zweispaltiges Layout mit Header und Footer. Alles gemeinsam liegt in einem container-div, der zentriert ist.
Nun kann ich in meinem linken div kein <p> mit Abstands-Angaben nutzen.
Sprich sobald ich für mein <p> ein margin, padding oder sogar eine line-height eingebe, verschiebt sich das ganze Layout (sprich der container-div) um einige Pixel nach links.
Das <p> welches ich meine ist das: #content_sub p.
Ich habe es unten im Code markiert.
Hat da jemand eine Lösung?
Hier mein css:
Code: |
body {
background-color: #fee6c2;
font-size: 0.8em;
font-family:Arial, Sans-Serif;
color:#564b47;
padding:0;
margin:0;
background-image:url(Bilder/Layoutbilder/hintergrundstreifen.jpg);
background-position: top center;
background-repeat: repeat-y;
}
a {color: #fff; text-decoration:none;}
a:visited {color:#fff; text-decoration:none;}
a:hover {color: #ccc; text-decoration:none;}
a:active { color:#ccc; text-decoration:none;}
/* ----------container zentriert das layout-------------- */
#container {
width: 853px;
margin: 0 auto;
padding: 0;
border: 1px solid red;
}
/* --------------left and right------------- */
#left {
float: left;
width: 305px;
height:470px;
margin: 0;
padding:0;
color:#ffffff;
background-image:url(Bilder/Layoutbilder/Startbild.jpg);
background-position: top left;
background-repeat: no-repeat;
}
#right {
float: right;
width: 118px;
margin: 0;
padding: 0;
color:#00ffff;
background:url(Bilder/Layoutbilder/Kurve_rechts.jpg) right top no-repeat;
}
/* Menü */
#navigation {
margin:0;
padding:0;
float:right;
margin-top:120px;
width:100%;
}
.navifeld{
margin:0;
margin-top:5px;
padding:0;
padding-top:5px;
height:25px;
font-size:1.1em;
letter-spacing:0.06em;
font-weight:bold;
}
/* ----------banner for logo-------------- */
#header {
margin: 0;
padding: 0;
width:853px;
height:148px;
}
/* -----------------Inhalt allgemein--------------------- */
#content_sub {
width:720px;
border: 1px solid red;
}
#content_sub h1 {
padding: 50px 10px 10px 90px;
margin:0;
color:#06738a;
font-size:1.7em;
letter-spacing:0.05em;
font-weight:bold;
}
#content_sub h2 {
padding: 10px 10px 10px 90px;
margin:0;
color:#06738a;
font-weight:lighter;
font-size:1.4em;
letter-spacing:0.05em;
}
#content_sub p { /*Hier liegt das Problem-----------------------------------------------------------!!!!------*/
margin:0;
color:#5f372f;
font-size:1.2em;
}
#content_sub img {
margin:10px 40px 20px 90px;
float:left;
}
ul {
margin-left:78px;
margin-top:0;
margin-bottom: 30px;
font-size:1.2em;
}
li {
margin-top:10px;
color:#5f372f;
font-size:1em;
list-style-type:none;
list-style-image:url(Bilder/Layoutbilder/spiegelstrich.gif);
list-style-position:outside;
}
#mecky_sagt {
background-color:#d0c7c2;
font-size: 1em;
border-left: 14px solid #895a4a;
background-image:url(Bilder/Inhaltbilder/Signatur_Mecky_baige.jpg);
background-position:bottom right;
background-repeat:no-repeat;
width:70%;
}
#mecky_sagt p {
margin-top:10px;
padding:20px;}
/* -----------footer--------------------------- */
#footer {
clear: both;
padding: 0;
margin: 0px 118px 0px 0px;
width:100%;
background-image:url(Bilder/Layoutbilder/pfoten.jpg);
background-position: bottom right;
background-repeat: no-repeat;
height:70px;
}
#footer p{ margin:0px 10px 10px 30px;
padding-bottom:20px;
padding-top:20px;
color:#7c2d12;
font-size:1.3em;
line-height:1.4em;
}
|
Danke
|
|