Support » Themes » Banner-Bereich in mobiler Ansicht anders

  • Hi zusammen,
    ich konnte eben schon auf der Desktop-Ansicht den „Schleier“ des Hintergrundbildes (Banner-Bereich) entfernen. Aber in der mobilen Ansicht ist er immer noch da. Hat jemand eine Idee, wo ich im Theme noch was ändern muss?

    Hier meine CSS:

    /*!
    Theme Name: School Zone
    Theme URI: https://rarathemes.com/wordpress-themes/school-zone/
    Author: Rara Theme
    Author URI: https://rarathemes.com/
    Description: School Zone is a child theme of Education Zone free WordPress theme. School Zone is designed to suit special requirements of educational institutions like college, school, university, LMS, Training Center, Academy, Primary School, High school and Kindergarten. School Zone is very versatile and can be used to build various types of corporate and business websites. The theme is highly customizable with various features and personalization options. Like the parent theme, School Zone includes features like custom menu, attractive banner, stats counter, courses section, testimonial section, banner with Call-to-Action(CTA) button, and social media. The theme is SEO friendly with optimized codes, which make it easy for your site to rank on Google and other search engines. The theme is rigorously tested and optimized for speed and faster page load time and has a secure and clean code. The theme is also translation ready. Designed with visitor engagement in mind, School Zone helps you to easily and intuitively create professional and appealing websites. If your school, college or university needs an online home that is dynamic and multi-functional, this theme is a good place to start. Check the demo at https://demo.rarathemes.com/school-zone/, documentation at https://rarathemes.com/documentation/school-zone/, and get support at https://rarathemes.com/support-ticket/.
    Template: education-zone
    Version: 1.0.4
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Text Domain: school-zone
    Tags: blog, two-columns, right-sidebar, footer-widgets, custom-background, custom-header, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template, education, theme-options, custom-logo, e-commerce, one-column, post-formats
    
    This theme, like WordPress, is licensed under the GPL.
    Use it to make something cool, have fun, and share what you've learned with others.
    
    School Zone is based on Underscores http://underscores.me/, (C) 2012-2016 Automattic, Inc.
    Underscores is distributed under the terms of the GNU GPL v2 or later.
    */
    
    a{
        color: #79B530;
    }
    
    .site-header.header-two .header-top .container:after{
        display: none;
    }
    
    .site-header.header-two .header-top .container{
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .site-header.header-two .header-top .secondary-nav{
        float: none;
        display: block;
        padding: 0;
    }
    
    .site-header.header-two .header-top .secondary-nav ul{
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        background: none;
        font-size: 14px;
        line-height: 17px;
        position: unset;
        border-top: 0;
    }
    
    .site-header.header-two .header-top .secondary-nav ul li{
        border: 0;
        position: relative;
        margin-right: 20px;
    }
    
    .site-header.header-two .header-top .secondary-nav ul li:last-child{
        margin-right: 0;
    }
    
    .site-header.header-two .header-top .secondary-nav ul li a{
        color: #000;
        padding: 0;
    }
    
    .site-header.header-two .header-top .secondary-nav ul ul{
        position: absolute;
        top: 100%;
        left: -15px;
        width: 240px;
        background: #f8f8f8;
        padding-top: 15px;
        display: none;
    }
    
    .site-header.header-two .header-top .secondary-nav ul li:hover > ul{
        display: block;
    }
    
    .site-header.header-two .header-top .secondary-nav ul ul ul{
        left: 100%;
        top: 0;
        padding-top: 0;
    }
    
    .site-header.header-two .header-top .secondary-nav ul ul li a{
        padding: 10px 15px;
    }
    
    .site-header.header-two .header-top .top-links{
        margin: 0;
        flex-basis: 0;
        flex-grow: 1;
    }
    
    .site-header .social-networks {
        margin: 0;
        padding: 0;
        float: right;
        font-size: 0;
        line-height: 0;
    }
    
    .site-header .social-networks li {
        display: inline-block;
        margin-left: 14px;
        list-style: none;
        color: #7f7f7f;
        font-size: 16px;
        line-height: 18px;
    }
    
    .site-header .social-networks li a{
        color: #79B530;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .site-header .social-networks li a:hover {
        color: #7f7f7f;
    }
    
    .site-header.header-two .header-top {
    	background: #f8f8f8;
    	padding: 16px 0;
    }
    
    .site-header.header-two .main-navigation {
    	float: left;
    	width: auto;
    }
    
    .site-branding {
        float: left;
        display: flex;
        align-content: center;
    }
    
    .site-branding .custom-logo{
        margin-right: 15px;
    }
    
    .site-branding .site-title a{
        font-size: 26px;
        line-height: 29px;
        color: #79B530;
    }
    
    /*.site-branding*/
    
    .site-header .apply-btn {
        border: 2px solid #79B530;
        color: #79B530;
        padding: 15px 32px;
        font-size: 14px;
        line-height: 14px;
        font-weight: 900;
        text-transform: uppercase;
        float: right;
        margin-top: 10px;
        transition: all 0.2s ease 0s;
    }
    
    .site-header .apply-btn:hover, 
    .site-header .apply-btn:focus {
        background: #79B530;
        color: #fff;
    }
    
    .site-header.header-two .form-section {
    	float: right;
    	position: relative;
    	padding: 16px 0;
    }
    
    .site-header.header-two .form-section svg {
    	color: #fff;
        padding-left: 0;
    }
    
    .site-header.header-two .form-section .example {
    	position: absolute;
    	display: none;
    	top: 100%;
    	right: 0;
    	z-index: 999;
    	background: #3B9AD7;
    }
    
    .site-header.header-two .form-section .example form {
    	width: 240px;
    	height: 40px;
    	padding: 5px 5px;
    	box-shadow: 0 1px 0 0 #3B9AD7;
    	background: #3B9AD7;
    	border: 0;
    }
    
    .site-header.header-two .form-section .example form input[type="search"] {
    	height: 100%;
    	padding: 0 10px;
    	background: none;
    	width: 75%;
    	float: left;
    	color: #fff;
    }
    
    .site-header.header-two .form-section .example form input[type="submit"] {
    	float: left;
    	width: 35px;
    	background: rgba(0, 0, 0, 0) url("images/search-icon.png") no-repeat scroll 12px 5px;
    	border: 0;
        padding: 0;
        box-shadow: none;
        text-indent: 100%;
    }
    
    .site-header.header-two .info-box {
    	float: right;
    	/*width: 200px;*/
    	overflow: hidden;
    	font-size: 16px;
    	line-height: 20px;
    	font-weight: 300;
    	margin-right: 30px;
    	color: #747474;
    	margin-top: 10px;
    }
    
    .site-header.header-two .info-box svg {
    	display: inline-block;
    	color: #79B530;
    	font-size: 30px;
    	margin-right: 16px;
    	line-height: 32px;
        vertical-align: middle;
    }
    
    .site-header.header-two .info-box span {
    	display: inline-block;
    	vertical-align: middle;
    }
    
    .site-header.header-two .info-box span a {
    	color: #747474;
    	display: block;
    }
    
    .site-header.header-two .info-box span a:hover {
    	color: #79B530;
    }
    
    .site-header.header-two #mobile-header {
    	padding: 20px 0;
    	float: left;
    }
    
    .site-header.header-two #mobile-header svg {
    	color: #fff;
    }
    
    .site-header.header-two .form-section .example form input[type="submit"] {
    	width: 30px;
    }
    
    .site-header .header-bottom{
        background: #79B530;
    }
    
    .main-navigation ul ul{
        background: #79B530;
    }
    
    .site-header.header-two .form-section .example form{
        background: #79B530;
        box-shadow: 0 1px 0 0 #79B530;
    }
    
    .banner{
        position: relative;
    }
    
    .banner:after{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .banner .banner-text{
        z-index: 1;
        top: 52%;
        -webkit-transform: translateY(-50%);
        -moz-transform: translateY(-50%);
        transform: translateY(-50%);
        height: auto;
    }
    
    .banner .banner-text .text{
        max-width: 650px;
        width: 100%;
        margin: 0 auto;
        text-align: center;
        color: #fff;
    	text-shadow: 0 0 5px black;
    }
    
    .banner img{
        width: 100%;
        height: 692px;
        object-fit: cover;
    }
    
    .banner .banner-text .title,
    .banner .banner-text .text span{
        font-size: 50px;
        line-height: 62px;
        margin: 0 0 15px;
        color: #fff;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: none;
    }
    
    .banner .banner-text .btn-holder .btn-free-inquiry,
    .banner .banner-text .text .course-link{
        font-size: 16px;
        line-height: 25px;
        color: #fff;
        border: 2px solid #79B530;
        background: #79B530;
        text-transform: uppercase;
    	text-shadow: none;
        display: inline-block;
        padding: 10px 23px;
        margin: 0 7px;
        font-weight: 400;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .banner .banner-text .btn-holder .btn-free-inquiry:hover,
    .banner .banner-text .btn-holder .btn-free-inquiry:focus,
    .banner .banner-text .text .course-link:hover,
    .banner .banner-text .text .course-link:focus{
        text-decoration: none;
        background: none;
    }
    
    .banner .banner-text .btn-holder .btn-view-service{
        font-size: 16px;
        line-height: 25px;
        color: #fff;
        border: 2px solid #fff;
        background: none;
        text-transform: uppercase;
    	text-shadow: none;
        display: inline-block;
        padding: 10px 23px;
        margin: 0 7px;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .banner .banner-text .btn-holder .btn-view-service:hover,
    .banner .banner-text .btn-holder .btn-view-service:focus{
        text-decoration: none;
        background: #fff;
        color: #79B530;
    }
    
    .video-banner .wp-custom-header {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 */
        padding-top: 25px;
        height: 0;
    }
    
    .video-banner iframe,
    .video-banner video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .banner .wp-custom-header-video-button{
        position: absolute;
        bottom: 40px;
        left: 20px;
        z-index: 2;
        padding: 0;
        margin: 0;
        background: none;
        border: 0;
        border-radius: 0;
        font-size: 0;
        box-shadow: none;
        text-shadow: none;
    }
    
    .banner .wp-custom-header-video-play:after{
        content: '\f04b';
        font-family: 'FontAwesome';
        color: #fff;
        font-size: 30px;
    }
    
    .banner .wp-custom-header-video-pause:after{
        content: '\f04c';
        font-family: 'FontAwesome';
        color: #fff;
        font-size: 30px;
    }
    
    .thumb-text li .box-1{
        background: #4886FF;
    }
    
    .thumb-text li .box-2{
        background: #FF6F6F;
    }
    
    .thumb-text li .box-3{
        background: #B5D56A;
    }
    
    .thumb-text li .box-4{
        background: #F88147;
    }
    
    .featured-courses ul li .image-holder .description .learn-more{
        border: 2px solid #79B530;
        background: #79B530;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .featured-courses ul li .image-holder .description .learn-more:hover,
    .featured-courses ul li .image-holder .description .learn-more:focus{
        background: none;
        color: #79B530;
    }
    
    .theme .theme-description .apply:hover,
    .theme .theme-description .apply:focus{
        background: #79B530;
        border-color: #79B530;
    }
    
    .choose-us .col h3 a:hover,
    .choose-us .col h3 a:focus{
        color: #79B530;
    }
    
    .latest-events .learn-more{
        background: #79B530;
        border: 2px solid #79B530;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .latest-events .learn-more:hover,
    .latest-events .learn-more:focus{
        background: none;
    }
    
    .search-section{
        background: #79B530;
    }
    
    .search-section form input[type="submit"]{
        color: #79B530;
    }
    
    #crumbs{
        color: #79B530; 
    }
    
    .widget-area .widget form input[type="submit"],
    .page-header form input[type="submit"]{
        background-color: #79B530;
    }
    
    #primary .read-more{
        border: 2px solid #79B530;
        background: #79B530;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    #primary .read-more:hover,
    #primary .read-more:focus{
        background: none;
        color: #79B530;
    }
    
    .navigation.pagination .page-numbers.current,
    .navigation.pagination .page-numbers:hover,
    .navigation.pagination .page-numbers:focus{
        border-color: #79B530;
        color: #79B530;
    }
    
    .error404 .not-found span{
        color: #79B530;
    }
    
    .error404 .homepage{
        background: #79B530;
        border: 2px solid #79B530;
        -webkit-transition: ease 0.2s;
        -moz-transition: ease 0.2s;
        transition: ease 0.2s;
    }
    
    .error404 .homepage:hover,
    .error404 .homepage:focus{
        background: none;
        color: #79B530;
    }
    
    .welcome-note .col h3 {
        color: #79B530;
    }
    
    #mobile-header-2 {
        display: block;
    }
    
    @media only screen and (min-width: 991.5px) {
        #mobile-header-2 {
            display: none;
        }
    }
    
    @media only screen and (max-width: 991px){
        #top-navigation{
            display: none;
        }
    
        .site-branding{
            width: 100%;
        }
    
        .site-header.header-two .info-box{
            float: left;
        }
    
        .thumb-text li{
            width: 100%;
        }
    
        .mobile-header .apply-btn a{
            border-color: #79B530;
            color: #79B530;
        }
    
        .mobile-header .apply-btn a:hover,
        .mobile-header .apply-btn a:focus{
            background: #79B530;
        }
    
        .mobile-menu .main-navigation ul li a:hover,
        .mobile-menu .main-navigation ul li a:focus,
        .mobile-menu .main-navigation ul li:hover > a,
        .mobile-menu .main-navigation ul li:focus > a,
        .mobile-menu .main-navigation ul .current-menu-item > a,
        .mobile-menu .main-navigation ul .current-menu-ancestor > a,
        .mobile-menu .main-navigation ul .current_page_item > a,
        .mobile-menu .main-navigation ul .current_page_ancestor > a,
        .mobile-menu .secondary-nav ul li a:hover,
        .mobile-menu .secondary-nav ul li a:focus,
        .mobile-menu .secondary-nav ul li:hover > a,
        .mobile-menu .secondary-nav ul li:focus > a,
        .mobile-menu .secondary-nav ul .current-menu-item > a,
        .mobile-menu .secondary-nav ul .current-menu-ancestor > a,
        .mobile-menu .secondary-nav ul .current_page_item > a,
        .mobile-menu .secondary-nav ul .current_page_ancestor > a,
        .mobile-menu .contact-info a:hover,
        .mobile-menu .contact-info a:focus{
            color: #79B530;
        }
    
        .mobile-menu .social-networks li a:hover,
        .mobile-menu .social-networks li a:focus{
            background: #79B530;
            border-color: #79B530;
        }
    }
    
    @media only screen and (max-width: 767px){
        .site-header .apply-btn{
            float: left;
        }
    
        .site-header.header-two .info-box{
            width: 100%;
        }
    
        .site-header .form-section{
            width: auto;
        }
    }
    

    Die Seite, für die ich Hilfe brauche: [Anmelden, um den Link zu sehen]

Ansicht von 3 Antworten - 1 bis 3 (von insgesamt 3)
  • Das Stylesheet brauchst du nicht einfügen, wir können das auf deiner Website einsehen, wenn du bereits die URL angbist und das Theme ist ja auch frei zugänglich und der Code damit für alle einsehbar.

    Ich habe nicht geprüft, ob du im Stylesheet selbst noch Änderungen vorgenommen hast – dort gehören sie jedenfalls nicht hin, weil das schwer zu pflegen ist und bei Updates überschrieben wird.

    Die Schattierung über dem Header-Bild ist vom Theme-Entwickler als Layout vorgesehen und es gibt scheinbar in der kostenlosen Version keine Themeeinstellung, das abzuschalten. Hier kannst du dir nur mit einer eigenen CSS-Regel behelfen, die du im Customizer unter Zusätzliches CSS einträgst:

    .banner:after {
         background: none;
    }

    Die CSS-Regel wirkt sich auf die Darstellung in allen Bildschirmgrößen aus.

    Thread-Starter herpedia

    (@herpedia)

    Danke für die Antwort 🙂
    Das funktioniert schon mal soweit…

    Ich hätte aber noch eine Frage:
    In der mobilen Ansicht ist das header Bild nicht in Original-Qualität, sondern sieht viel schlechter (pixeliger) aus. Kann ich das anhand der CSS ändern?

    Das hängt damit zusammen, dass du ein Bild auf 320 x 151 Pixel beschnitten hast, dass eigentlich eine Größe von 1920 x 692 Pixel haben soll. Um die auf kleinen Displays vorgesehen Größe einzuhalten, muss das Bild hochgerechnet werden, was automatisch zu einer Verschlechterung der Bildqualität führt. Auf größeren Bildschirmen fällt das weniger auf. Also: anderes Bild mit höherer Auflösung nehmen, auf 1920 x 692 Pixel beschneiden, mit einem Bilderdienst wie https://tinyjpg.com/ optimieren, dann als Header-Bild hochladen und Beschneiden überspringen.

Ansicht von 3 Antworten - 1 bis 3 (von insgesamt 3)
  • Das Thema „Banner-Bereich in mobiler Ansicht anders“ ist für neue Antworten geschlossen.