mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Do 25.04.2024 16:39 Benutzername: Passwort: Auto-Login

Thema: Grafik breiter als div-Container? vom 19.08.2011


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Allgemeines - Nonprint -> Grafik breiter als div-Container?
Autor Nachricht
Mr. Bond
Threadersteller

Dabei seit: 27.08.2010
Ort: Duisburg
Alter: 30
Geschlecht: Männlich
Verfasst Fr 19.08.2011 13:36
Titel

Grafik breiter als div-Container?

Antworten mit Zitat Zum Seitenanfang

Hallo,

ich habe folgendes Gestaltungsproblem: Die Footergrafik soll sich auf der x-Achse über die gesamte Viewport-Breite wiederholen. Damit sie jedoch stets unterhalb des Contentbereichs ist, befindet sie sich im selben (960 px breiten) div-Container. Aus diesem Grund wird die Grafik natürlich beschnitten.

So siehts momentan im Browser aus:




Uploaded with ImageShack.us

Ich hoffe, jemand kann mir weiterhelfen Lächel

Gruß,
Mr. Bond
  View user's profile Private Nachricht senden
DerM

Dabei seit: 18.01.2009
Ort: -
Alter: 42
Geschlecht: Männlich
Verfasst Fr 19.08.2011 13:45
Titel

Antworten mit Zitat Zum Seitenanfang

wieso packst Du die Grafik nicht einfach in den Body Background und positionierst sie unten?
  View user's profile Private Nachricht senden
Anzeige
Anzeige
Mr. Bond
Threadersteller

Dabei seit: 27.08.2010
Ort: Duisburg
Alter: 30
Geschlecht: Männlich
Verfasst Fr 19.08.2011 13:59
Titel

Antworten mit Zitat Zum Seitenanfang

Das hab ich erst so gemacht, aber dann hat sie sich nicht verschoben, wenn der Content länger wurde. Soll ich mal die index.html posten?
  View user's profile Private Nachricht senden
Smooth-Graphics

Dabei seit: 22.05.2006
Ort: -
Alter: -
Geschlecht: Männlich
Verfasst Fr 19.08.2011 14:04
Titel

Antworten mit Zitat Zum Seitenanfang

Ja +CSS + Grafikinfos, denn so kann ich nur raten:

Code:

body{
   background-image: url(grafik.png) repeat-x bottom;
}
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
Mr. Bond
Threadersteller

Dabei seit: 27.08.2010
Ort: Duisburg
Alter: 30
Geschlecht: Männlich
Verfasst Fr 19.08.2011 14:14
Titel

Antworten mit Zitat Zum Seitenanfang

Vorab zur Info: Ich hab mit dem Grid-System von 960.gs gearbeitet.

Grafik: footer-rapport-2.png (1600 x 323 px)

index.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

   <title>Nadine's Beauty Nails</title>
   
    <link href="css/reset.css" media="screen,projection" rel="stylesheet" type="text/css" charset="utf-8" />
    <link href="css/grid.css" media="screen,projection" rel="stylesheet" type="text/css" charset="utf-8" />
    <link href="css/style.css" media="screen,projection" rel="stylesheet" type="text/css" charset="utf-8" />
   
</head>

<body>

  <div id="background">
   
    <div class="container container_12">
 
      <div id="content-wrapper" class="grid_12">
     
        <!-- Header -->
        <div class="grid_5">
          <a href="index.html"><h1 class="logo">Nadine's Beauty Nails</h1></a>
        </div>
        <div class="grid_1">
          &nbsp;
        </div>
        <!-- Navigation -->
        <div class="grid_6">
          <ul id="menu">
            <li class="start chosen"><a href="#">Start</a></li>
          <li class="angebot"><a href="#">Angebot</a></li>
          <li class="galerie"><a href="#">Galerie</a></li>
          <li class="anfahrt"><a href="#">Anfahrt</a></li>
         </ul>
        </div>
   
        <div class="clear">&nbsp;</div>
       
        <!-- Content -->
        <div class="grid_8">
          <div class="left-column">
         
            <h2>dies ist eine überschrift.</h2>
            <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, <a href="#">sed diam nonumy</a> eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
          <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu <a href="#">feugiat nulla facilisis</a> at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
         
          </div>
          <div class="left-column-bg">&nbsp;</div>
        </div>
       
        <div class="grid_3">
          <div class="right-column">
       
            <h2>zweite spalte.</h2>
            <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et.</p>
       
          </div>
          <div class="right-column-bg">&nbsp;</div>
        </div>
     
        <div class="clear">&nbsp;</div> 

        <!-- Footer -->
        <div id="footer-wrapper">
          &nbsp;                 
        </div>   
        <div id="footer-bar">
          &nbsp;         
        </div>
   
      </div>
 
    </div>
   
  </div>

</body>
</html>


style.css
Code:

/*-----------------------------------------------------*/
/*----------------------- Haupt -----------------------*/
/*-----------------------------------------------------*/

html {
   background:#f5f5ec;
}

#background {
   min-width:1200px;
   min-height:912px;
   background:url(../images/background-brush.png) no-repeat top center;
   margin:-17px auto -400px -237px;
}

#content-wrapper {
   width:960px;
   margin:0 auto 0 120px;
   padding:62px 0 0 0;
}

#footer-wrapper {
   height:323px;
   background:url(../images/footer-rapport-2.png) repeat-x;
}

#footer-bar {
   height:25px;
   background:#f9c278;
}

/*-----------------------------------------------------*/
/*---------------------- Schrift ----------------------*/
/*-----------------------------------------------------*/

#content-wrapper {
   font-family:Tahoma, Geneva, sans-serif;
}

#content-wrapper a {
   color:#ee7038;
   text-decoration:none;
}

#content-wrapper a:hover,
#content-wrapper a:focus{
   color:#fbb355;
   text-decoration:none;
}

h1, h2, h3, h4, h5, h6 {
   font-family:Georgia, "Times New Roman", Times, serif;
   font-weight:normal;
   line-height:160%;
   color:#a94d2d;
}

h2 {
   font-size:28px;
   margin-bottom:20px;
}

h4 {
   font-size:20px;
   margin-bottom:15px;
}

p, td, tr {
   font-size:12px;
   line-height:160%;
   margin-bottom:10px;
   color:#303130;
}

td, tr {
   padding-right:20px;
}

/*-----------------------------------------------------*/
/*------------------------ Teil -----------------------*/
/*-----------------------------------------------------*/

.logo {
   background:url(../images/header-logo.png) no-repeat;
   text-indent:-99999px;
   height:45px;
   width:383px;
}

/*------------------------ Menü -----------------------*/

#menu {
   width:460px;
   height:91px;
   margin:-45px 0 0 0;
   float:left;
   list-style-type:none;
}

#menu li {
   height:91px;
   float:left;
}

#menu li a {
   height:91px;
   padding:0 0 0 0;
   background:url(../images/menu-background.png) no-repeat 0 -91px;
   display:block;
}

#menu li.chosen a,
#menu li a:hover, #menu li a:focus {
   background-position:0 0;
}

#menu li.start a {
   width:79px;
   text-indent:-99999px;
}

#menu li.angebot a {
   width:130px;
   padding-left:21px;
   text-indent:-99999px;
   background-position:-79px -91px;
}

#menu li.angebot.chosen a,
#menu li.angebot a:hover, #menu li.angebot a:focus {
   background-position:-79px 0;
}

#menu li.galerie a {
   width:112px;
   padding-left:10px;
   text-indent:-99999px;
   background-position:-225px -91px;
}

#menu li.galerie.chosen a,
#menu li.galerie a:hover, #menu li.galerie a:focus {
   background-position:-225px 0;
}

#menu li.anfahrt a {
   width:94px;
   padding-left:14px;
   text-indent:-99999px;
   background-position:-350px -91px;
}

#menu li.anfahrt.chosen a,
#menu li.anfahrt a:hover, #menu li.anfahrt a:focus {
   background-position:-350px 0;
}

/*---------------------- Content ----------------------*/

.left-column {
   width:610px;
   min-height:200px;
   margin:35px 0 0 0;
   padding:10px;
   background-color:#fdfdfd;
}

.left-column-bg {
   margin:0 0 20px 0;
   background:url(../images/content-bottom-620.png) no-repeat bottom;
}

.right-column {
   width:300px;
   min-height:200px;
   margin:35px 0 0 0;
   padding:10px;
   background-color:#fdfdfd;
}

.right-column-bg {
   margin:0 -110px 20px 0;
   background:url(../images/content-bottom-300.png) no-repeat bottom;
}
  View user's profile Private Nachricht senden
Smooth-Graphics

Dabei seit: 22.05.2006
Ort: -
Alter: -
Geschlecht: Männlich
Verfasst Fr 19.08.2011 14:18
Titel

Antworten mit Zitat Zum Seitenanfang

Das kann ja gar nicht klappen, denn du bewegst dich innerhalb des Grid Systems. Du musst da raus. Wie? Siehe DerM.
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
pantonine

Dabei seit: 03.03.2011
Ort: gehen Sie bitte weiter…
Alter: -
Geschlecht: -
Verfasst Fr 19.08.2011 14:49
Titel

Antworten mit Zitat Zum Seitenanfang

Brauchst Du halt einen zusätzlichen Wrapper, den Du vertikal „aufdrücken musst.“
  View user's profile Private Nachricht senden
Mr. Bond
Threadersteller

Dabei seit: 27.08.2010
Ort: Duisburg
Alter: 30
Geschlecht: Männlich
Verfasst Fr 19.08.2011 15:01
Titel

Antworten mit Zitat Zum Seitenanfang

DerM hat geschrieben:
wieso packst Du die Grafik nicht einfach in den Body Background und positionierst sie unten?

Daraus ergeben sich folgende Probleme:
    - Die andere Hintergrundgrafik liegt über dem Footer.
    - Der Footer "wandert" trotz background-position:bottom; nicht nach unten, wenn der Content länger wird.

pantonine hat geschrieben:
Brauchst Du halt einen zusätzlichen Wrapper, den Du vertikal „aufdrücken musst.“

Wie meinst du das genau? Lächel
  View user's profile Private Nachricht senden
 
Ähnliche Themen Bei Klick eine Grafik in <div> Container anzeigen - wie ?
DIV Container bei Mouseover über DIV Container anzeigen
DIV-Container soll anderen DIV-Container verdrängen
CSS: Container im Container Vertikal zentrieren
Variabler Div-Container bis zum mittigen Div-Container
Firefox macht Seite breiter
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Allgemeines - Nonprint


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.