Sponsor-Board.de
Thema geschlossen  Thema schreiben 

.css Frage

Verfasser Nachricht

Beiträge: 1.245
Bewertung: 1
Registriert seit: Dec 2009
Status: offline


Beitrag: #1
.css Frage

Hallo SB - Gemeinde ,

Ich habe ein Problem und zwar ich will mein Design in die Mitte bekommen also "center" jedoch ist es immer links. Hier die .css Datei:

Code:
body
{
    margin: 0px;
    padding: 0px;
    color: #000;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 13px;
    line-height: 1.7em;
    background-color: #0a4b77;          
    background-position: top;
    background-repeat: repeat-x;

}


a, a:link, a:visited { color: #777700; text-decoration: none; }
a:hover { color: #808080; text-decoration: underline; }

p { margin: 0 0 10px 0; padding: 0; }
img { border: none; }

h1, h2, h3, h4, h5, h6 { color: #252323; font-weight: normal }

#main_top {
    position: absolute;
    top: 10px;
    left: 70px;
    padding:2px;
    width: 900px;
    height: 243px;
    background: url(images/content_top.png) no-repeat
}

#header {
    position: relative;
    left: 4.5px;
    width: 890px;
    height: 196px;
    background: url(images/header.jpg) no-repeat center top

}

#logo {
    position: relative;
    left: 4.5px;
    top: 45px;
    width: 350px;
    height: 90px;
    background: url(images/logo.png) no-repeat center top

}

#menu {
    position: relative;
    left: 70px;
    top: 222px;
    width: 904px;
    height: 70px;
    background: url(images/menü.png) no-repeat;
}

#menu ul {
    height: 70px;
    margin: 0;
    padding: 1px 0 0 0;
    list-style: none;
}

#menu ul li {
    padding: 0;    
    margin: 0;
    display: block;
}

#menu ul li a {
    float: left;
    display: block;
    height: 25px;
    padding: 8px 52px 0 50px;
    font-size: 15px;
    color: #000000;
    text-align: center;
    text-decoration: none;
    background: url(images/menu_divider.png) center right no-repeat;
}

#menu ul li a:hover, #menu ul .current {
    color: #0033FF;
}

#menu ul .last {
    background: none;
    padding-right: 52px
}
#oben {
    position: relative;
    left: 70px;
    top: 190px;
    width: 905px;
    height: 300px;
    background: url(images/conten_oben.jpg) no-repeat;
}

.banner_box {
    position: relative;
    top: 10px;
    left: 100px;
    clear: both;    
    width: 235px;
    margin-bottom: 30px;
}

.we_title {

    width: 800px;
    height: 20px;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.we_content {
    padding: 15px 25px;
    width: 800px;
    background: url(images/sidebar_box_middle.jpg) repeat-y left;
}
.we_bottom {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}

.seid_box {
    position: absolute;
    left: 780px;
    top: 270px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.seid_box2 {
    position: absolute;
    left: 780px;
    top: 500px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title2 {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content2 {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom2 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.sb_bottom2 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.seid_box3 {
    position: absolute;
    left: 780px;
    top: 800px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title3 {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content3 {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom3 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}

#content {
    position: relative;
    top: 50px;
    left: 70px;
    background-color:#FFFFFF;
    width: 905px;

}
#footer {
    position: relative;
    top: 42px;
    left: 200px;
    width: 905px;
    margin: 0 auto;
    color: #ffffff;
    padding: 5px 0;
}
#footer a {    color: #C0C0C0;}


Wodran liegt es?

MfG


[Link: Registrierung erforderlich]

21.01.2011 14:01
 
Alle Beiträge dieses Benutzers finden

Beiträge: 625
Bewertung: 7
Registriert seit: Aug 2010
Status: offline


Beitrag: #2
RE: .css Frage

im body margin auto Wink

bzw ein wrapper erstellen und da margin auto machen

21.01.2011 14:08
 
Alle Beiträge dieses Benutzers finden

Beiträge: 3.413
Bewertung: 33
Registriert seit: Oct 2010
Status: offline


Beitrag: #3
RE: .css Frage

margin-left: auto;
margin-right: auto;


Portfolio: [Link: Registrierung erforderlich]

Projekte
[Link: Registrierung erforderlich]
[Link: Registrierung erforderlich]

21.01.2011 14:16
 
Alle Beiträge dieses Benutzers finden

Beiträge: 1.245
Bewertung: 1
Registriert seit: Dec 2009
Status: offline


Beitrag: #4
RE: .css Frage

Code:
body
{
    margin-left: auto;
        margin-right: auto;
    padding: 0px;
    color: #000;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 13px;
    line-height: 1.7em;
    background-color: #0a4b77;          
    background-position: top;
    background-repeat: repeat-x;

}


a, a:link, a:visited { color: #777700; text-decoration: none; }
a:hover { color: #808080; text-decoration: underline; }

p { margin: 0 0 10px 0; padding: 0; }
img { border: none; }

h1, h2, h3, h4, h5, h6 { color: #252323; font-weight: normal }

#main_top {
    position: absolute;
    top: 10px;
    left: 70px;
    padding:2px;
    width: 900px;
    height: 243px;
    background: url(images/content_top.png) no-repeat
}

#header {
    position: relative;
    left: 4.5px;
    width: 890px;
    height: 196px;
    background: url(images/header.jpg) no-repeat center top

}

#logo {
    position: relative;
    left: 4.5px;
    top: 45px;
    width: 350px;
    height: 90px;
    background: url(images/logo.png) no-repeat center top

}

#menu {
    position: relative;
    left: 70px;
    top: 222px;
    width: 904px;
    height: 70px;
    background: url(images/menü.png) no-repeat;
}

#menu ul {
    height: 70px;
    margin: 0;
    padding: 1px 0 0 0;
    list-style: none;
}

#menu ul li {
    padding: 0;    
    margin: 0;
    display: block;
}

#menu ul li a {
    float: left;
    display: block;
    height: 25px;
    padding: 8px 52px 0 50px;
    font-size: 15px;
    color: #000000;
    text-align: center;
    text-decoration: none;
    background: url(images/menu_divider.png) center right no-repeat;
}

#menu ul li a:hover, #menu ul .current {
    color: #0033FF;
}

#menu ul .last {
    background: none;
    padding-right: 52px
}
#oben {
    position: relative;
    left: 70px;
    top: 190px;
    width: 905px;
    height: 300px;
    background: url(images/conten_oben.jpg) no-repeat;
}

.banner_box {
    position: relative;
    top: 10px;
    left: 100px;
    clear: both;    
    width: 235px;
    margin-bottom: 30px;
}

.we_title {

    width: 800px;
    height: 20px;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.we_content {
    padding: 15px 25px;
    width: 800px;
    background: url(images/sidebar_box_middle.jpg) repeat-y left;
}
.we_bottom {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}

.seid_box {
    position: absolute;
    left: 780px;
    top: 270px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.seid_box2 {
    position: absolute;
    left: 780px;
    top: 500px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title2 {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content2 {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom2 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.sb_bottom2 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}
.seid_box3 {
    position: absolute;
    left: 780px;
    top: 800px;
    clear: both;
    width: 50px;
    margin-bottom: 30px;
}
.sb_title3 {
    width: 130px;
    height: auto;
    padding: 4px 30px;
    font-size: 14px;
    color: #ffffff;
    background: url(images/sidebar_box_top.jpg) no-repeat top left;
}
.sb_content3 {
    padding: 15px 25px;
    width: 180px;
    background: url(images/sidebar_boxx_middle.jpg) repeat-y left;
}
.sb_bottom3 {
    width: 800px;
    background: url(images/sidebar_box_bottom.jpg) no-repeat top left;
}

#content {
    position: relative;
    top: 50px;
    left: 70px;
    background-color:#FFFFFF;
    width: 905px;

}
#footer {
    position: relative;
    top: 42px;
    left: 200px;
    width: 905px;
    margin: 0 auto;
    color: #ffffff;
    padding: 5px 0;
}
#footer a {    color: #C0C0C0;}


Geht immer noch nicht?


[Link: Registrierung erforderlich]

21.01.2011 14:33
 
Alle Beiträge dieses Benutzers finden

Beiträge: 2.199
Bewertung: 74
Registriert seit: Oct 2007
Status: offline


Beitrag: #5
RE: .css Frage

Gib uns doch mal ein Link zum Design.


[Link: Registrierung erforderlich]
[Link: Registrierung erforderlich]

21.01.2011 14:56
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden

Beiträge: 1.245
Bewertung: 1
Registriert seit: Dec 2009
Status: offline


Beitrag: #6
RE: .css Frage

[Link: Registrierung erforderlich]

21.01.2011 15:17
 
Alle Beiträge dieses Benutzers finden

Beiträge: 2.199
Bewertung: 74
Registriert seit: Oct 2007
Status: offline


Beitrag: #7
RE: .css Frage

Also mein Bildschrim ist 1280 breit, das Design ragt nicht über den Bildschrim raus, dennoch habe ich einen Scrollbalken um nach links bzw nach rechts zu scrollen obwohl da nur noch ein Stück blauer Hintergrund ist.

Das wäre das 1. Problem das du mal beseitigen musst, daher wird es denke ich mal auch nicht mittig.


[Link: Registrierung erforderlich]
[Link: Registrierung erforderlich]

21.01.2011 15:54
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden

Beiträge: 1.608
Bewertung: 9
Registriert seit: Aug 2010
Status: offline


Beitrag: #8
RE: .css Frage

erstell einen wrapper
Den machste um dein Design also
<div id="wrapper">
dein Design
</div>

In der .css dann:

#wrapper {
margin:auto;
width:breite deines Designs;
}

gruß
Damian


Mit freundlichem Gruß
Damian P.

21.01.2011 17:54
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Thema geschlossen  Thema schreiben 

Möglicherweise verwandte Themen...
Thema: Verfasser Antworten: Ansichten: Letzter Beitrag
  Frage Script Website HardwareNow 3 2.181 16.02.2018 12:32
Letzter Beitrag: vitalizing-τέχνη
  PhP / HTML Frage Bildergalerie? HardwareNow 4 2.190 27.07.2017 13:14
Letzter Beitrag: GYJohn
  Frage TextFeld HTML ? HardwareNow 1 1.898 06.12.2016 12:46
Letzter Beitrag: Muetzus
  Bash Script Frage ? HardwareNow 1 1.789 13.09.2016 11:33
Letzter Beitrag: NetFreak
  Template Frage HardwareNow 4 1.703 27.05.2016 18:07
Letzter Beitrag: HardwareNow

 Druckversion anzeigen
 Thema einem Freund senden
 Thema abonnieren
 Thema zu den Favoriten hinzufügen

Sponsor-Board.de

Community
Über uns
Partner
Powered by Mybb: Copyright 2002-2024 by MyBB Group - Deutsche-Übersetzung von Mybb.de
 
© 2007-2024 Sponsor-Board.de - Hosted by OVH

Willkommen auf SB!   Sie benötigen ein Sponsoring?   1. Anmelden   2. Sponsoring-Anfrage erstellen   3. Nachrichten von Sponsoren erhalten   Kostenlos!   Jetzt registrieren