Twenty Eleven Theme - grauen Balken im Header entfernen

  • Hallo Leute,

    könnte mir bitte jemand verraten, wie ich den grauen Balken über dem Header Image entfernen kann?
    Ich hab schon ewig rumprobiert und gesucht, aber ohne Erfolg.
    Der Streifen ist nur ein paar px hoch, erstreckt sich aber über die Breite des Headers. Auf der folgenden Seite könnte man es noch tolerieren (http://www.alte-schusterei.de), aber auf einer anderen, die ich mit dem gleichen Theme bauen will, sieht es schlimm aus.
    Ich habe einen Banner in Photoshop gebaut (und ihn mit <img src...) über den wechselnden Bildern aus dem Template eingefügt.
    Vielen Dank!

    PS: Hier noch ein Auszug vom Quellcode aus dem Header.


    [COLOR=#696969]
    [/COLOR][COLOR=#696969]</head>[/COLOR]
    [COLOR=#696969]
    [/COLOR]
    [COLOR=#696969]<body <?php body_class(); ?>>[/COLOR]
    [COLOR=#696969]
    [/COLOR]
    [COLOR=#696969]<div id="page" class="hfeed">[/COLOR]
    [COLOR=#696969] <header id="branding" role="banner">[/COLOR]
    [COLOR=#696969] <hgroup>[/COLOR]
    [COLOR=#696969] <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>[/COLOR]
    [COLOR=#696969] <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>[/COLOR]
    [COLOR=#696969] </hgroup>[/COLOR]
    [COLOR=#696969] [/COLOR]
    [COLOR=#696969]<center>[/COLOR]
    [COLOR=#696969]<img src="http://www.alte-schusterei.de/wp-content/the…ages/banner.jpg">[/COLOR]
    [COLOR=#696969]</center>[/COLOR]
    [COLOR=#696969] <?php[/COLOR]
    [COLOR=#696969] // Check to see if the header image has been removed[/COLOR]
    [COLOR=#696969] $header_image = get_header_image();[/COLOR]
    [COLOR=#696969] if ( $header_image ) :[/COLOR]
    [COLOR=#696969] // Compatibility with versions of WordPress prior to 3.4.[/COLOR]
    [COLOR=#696969] if ( function_exists( 'get_custom_header' ) ) {[/COLOR]
    [COLOR=#696969] // We need to figure out what the minimum width should be for our featured image.[/COLOR]
    [COLOR=#696969] // This result would be the suggested width if the theme were to implement flexible widths.[/COLOR]
    [COLOR=#696969] $header_image_width = get_theme_support( 'custom-header', 'width' );[/COLOR]
    [COLOR=#696969] } else {[/COLOR]
    [COLOR=#696969] $header_image_width = HEADER_IMAGE_WIDTH;[/COLOR]
    [COLOR=#696969] }[/COLOR]
    [COLOR=#696969] ?>[/COLOR]
    [COLOR=#696969] <a href="<?php echo esc_url( home_url( '/' ) ); ?>">[/COLOR]
    [COLOR=#696969] [/COLOR]
    [COLOR=#696969] <?php[/COLOR]
    [COLOR=#696969] // The header image[/COLOR]
    [COLOR=#696969] // Check if this is a post or page, if it has a thumbnail, and if it's a big one[/COLOR]
    [COLOR=#696969] if ( is_singular() && has_post_thumbnail( $post->ID ) &&[/COLOR]
    [COLOR=#696969] ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&[/COLOR]
    [COLOR=#696969] $image[1] >= $header_image_width ) :[/COLOR]
    [COLOR=#696969] // Houston, we have a new header image![/COLOR]
    [COLOR=#696969] echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );[/COLOR]
    [COLOR=#696969] else :[/COLOR]
    [COLOR=#696969] // Compatibility with versions of WordPress prior to 3.4.[/COLOR]
    [COLOR=#696969] if ( function_exists( 'get_custom_header' ) ) {[/COLOR]
    [COLOR=#696969] $header_image_width = get_custom_header()->width;[/COLOR]
    [COLOR=#696969] $header_image_height = get_custom_header()->height;[/COLOR]
    [COLOR=#696969] } else {[/COLOR]
    [COLOR=#696969] $header_image_width = HEADER_IMAGE_WIDTH;[/COLOR]
    [COLOR=#696969] $header_image_height = HEADER_IMAGE_HEIGHT;[/COLOR]
    [COLOR=#696969] }[/COLOR]
    [COLOR=#696969] ?>[/COLOR]
    [COLOR=#696969] <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />[/COLOR]
    [COLOR=#696969]
    [/COLOR]
    [COLOR=#696969] <?php endif; // end check for featured image or standard header ?>[/COLOR]
    [COLOR=#696969] </a>[/COLOR]
    [COLOR=#696969] <?php endif; // end check for removed header image ?>[/COLOR]

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • style.css ab Zeile 518:

    Code
    #branding {
        [COLOR="#FF0000"]border-top: 2px solid #BBBBBB;[/COLOR]
        padding-bottom: 10px;
        position: relative;
        z-index: 9999;
    }

    Die rote Zeile entfernen.

    EDIT: Wenn Du hier Code postest, dann benutze bitte die Code-Buttons im Editor.

    Einmal editiert, zuletzt von mfitzen (27. Januar 2013 um 13:35)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!