ThemeShaper Forums » Thematic

[closed]

CSS? Why doesn't title background image show in Safari Mobile

(3 posts)
  • Started 12 years ago by Solomon
  • Latest reply from Solomon
  • This topic is not resolved
  1. It shows fine in all other browsers, including Safari desktop, but when I look on my iPhone, the background image (a gray .gif) doesn't show up on the entry titles. All other background images on the page look fine as far as I can see. http://www.solomonia.com/wp/

    Relevant css:

    .entry-title {
    background: #ffffff url(../images/titlebackgrounde3e3e1.gif) top left no-repeat;
    font: 20px 'Molengo',"Lucida Sans", "Lucida Sans Unicode", "Trebuchet MS", sans-serif;
    min-height: 40px;
    font-weight:normal;
    padding: 5px 0px 10px 20px;
    margin: 0;
    }

    Any ideas?

    Posted 12 years ago #
  2. Additional: Wow, I've just noticed that the entry title element is messed up on Safari desktop (and no other browsers that I can test -- Chrome, FF, IE). Not only does the background image show, but the element never seems to get closed. Very odd.

    Hmmm...view source is showing me that entry-title starts with an H1 but closes with /H2. How do you like that? Maybe other browsers handle the screw up better than others. I'll have to dig in to why that's happening. I don't recall changing anything like that, but maybe I did.

    Posted 12 years ago #
  3. Ah, OK, I found the problem and fixed the issue with single entries and the screwed up header. I had messed up something in my functions. Just for your patience, good readers, here is my code for the title that includes an author gravatar:

    // Let's put our author gravatar in the post header.
    function childtheme_override_postheader_posttitle() {
    	global $authordata;
    	if (is_single() || is_page()) {
    	        $posttitle = '<h1 class="entry-title"><span class="title-author-gravatar"><a href="';
    			$posttitle .= get_author_posts_url($authordata->ID, $authordata->user_nicename);
    			$posttitle .= '" title="' . __('View all posts by ', 'thematic') . get_the_author_meta( 'display_name' ) . '">';
    			$posttitle .= get_avatar( get_the_author_email(), '40' );
    			$posttitle .= '</a></span><a href="';
    	        $posttitle .= apply_filters('the_permalink', get_permalink());
    	        $posttitle .= '" title="';
    	        $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
    	        $posttitle .= '" rel="bookmark">';
    	        $posttitle .= get_the_title();
    	        $posttitle .= "</a></h1>\n";
    	    } elseif (is_404()) {
    	        $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
    	    } else {
    	        $posttitle = '<h2 class="entry-title"><span class="title-author-gravatar"><a href="';
    			$posttitle .= get_author_posts_url($authordata->ID, $authordata->user_nicename);
    			$posttitle .= '" title="' . __('View all posts by ', 'thematic') . get_the_author_meta( 'display_name' ) . '">';
    			$posttitle .= get_avatar( get_the_author_email(), '40' );
    			$posttitle .= '</a></span><a href="';
    	        $posttitle .= apply_filters('the_permalink', get_permalink());
    	        $posttitle .= '" title="';
    	        $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
    	        $posttitle .= '" rel="bookmark">';
    	        $posttitle .= get_the_title();
    	         $posttitle .= "</a></h2>\n";
    
    	    }
    
    	    return apply_filters('thematic_postheader_posttitle',$posttitle); 
    
    	}

    However, the background image still isn't showing.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.