www.webdeveloper.com
Results 1 to 4 of 4

Thread: Safari 4.0 doesn't read my margin/width properly!

  1. #1
    Join Date
    Jun 2009
    Posts
    9

    Safari 4.0 doesn't read my margin/width properly!

    Hi, I've created a wordpress website by customizing a template that uses the Blueprint CSS framework. Everything went well until my client decided that they want background pattern behind a white content area.

    In safari, the white colored background for the content area seems to spill out of the width to fill up almost the whole page. I've been looking for fixes to no avail. Please help!

    Here's the website i'm working on:
    http://www.soundsgood.sg/wordpress

    When you view the website in IE or Firefox, it looks perfect! Just not in Safari.

    Here's my CSS files:
    style.css in my main wp dir
    grid.css

    And here's my home.php:
    Code:
    <?php get_header(); ?>
    <!--START LEFT SIDE-->
    <div class="bigger">
    <div id="feature" class="column span-15 colborder">
    <!--BEGIN MAIN PAGE POST-->
     <?php query_posts('showposts=1&cat=12'); ?>
        <?php while (have_posts()) : the_post(); ?>
    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"> <?php the_title(); ?></a><span class="meta_align_right"><?php the_time('F Y') ?> |  by <?php the_author_posts_link(); ?> | <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></h3>
    		
    <?php the_content('50'); ?>
        <?php endwhile; ?>
    </div>
    
    
    <!-- BEGIN TWO FEATURED POSTS -->
    <div class="column span-8 last">
    <div id="home_right">
    <h3>Featured</h3>
     <?php query_posts('showposts=2&cat=9&offset=1'); ?>
        <?php while (have_posts()) : the_post(); ?>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img class="photo_align_left" src="<?php $key="small_photo"; echo get_post_meta($post->ID, $key, true); ?>" alt="Photo: <?php the_title(); ?>"  /></a>
    <div class="entry">
    <h6><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h6>
    <div class="byline">by <?php the_author_posts_link(); ?></div>
    <div class="excerpt_small"><?php the_excerpt(); ?></div>
    </div>
    <hr></hr>
        <?php endwhile; ?>
    
    
    <!-- CONTESTS -->
    
    <?php query_posts('showposts=1&cat=8'); ?>
        <?php while (have_posts()) : the_post(); ?>
    	<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
    <img class="photo_align_left" src="<?php $key="contest"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title(); ?>"></a>
        <?php endwhile; ?>
    
    <!-- ADVERTS -->
    
    		<?php query_posts('showposts=1&cat=14'); ?>
        <?php while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>
        <?php endwhile; ?>
    
    </div>
    </div>
    <hr></hr>
    
    <!-- BOTTOM FIRST CATEGORY LISTINGS -->
        <?php
    // enter the IDs of the categories to display
    $display_categories = array(3);
    foreach ($display_categories as $category) { ?>
    <div class="column span-4 firstborder">
    <div class="five_posts">
          <?php query_posts("showposts=1&cat=$category");
    	    $wp_query->is_category = false;
    		$wp_query->is_archive = false;
    		$wp_query->is_home = true;
    		 ?>
          <h4><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></h4>
    <hr></hr>
          <?php while (have_posts()) : the_post(); ?>
          
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="small_photo"; echo get_post_meta($post->ID, $key, true); ?>" alt="Photo: <?php the_title(); ?>" /></a>
          <h6><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h6>
          <div class="excerpt_small"><?php the_excerpt(); ?></div>
            <div class="meta"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>
          <?php endwhile; ?>
        </div>
    </div>
        <?php } ?>
    
    
    
    <!-- BOTTOM MIDDLE 3 CATEGORY LISTINGS -->
        <?php
    // enter the IDs of the categories to display
    $display_categories = array(4,5,6);
    foreach ($display_categories as $category) { ?>
    <div class="column span-4 middleborder">
    <div class="five_posts">
          <?php query_posts("showposts=1&cat=$category");
    	    $wp_query->is_category = false;
    		$wp_query->is_archive = false;
    		$wp_query->is_home = true;
    		 ?>
          <h4><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></h4>
    <hr></hr>
          <?php while (have_posts()) : the_post(); ?>
          
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="small_photo"; echo get_post_meta($post->ID, $key, true); ?>" alt="Photo: <?php the_title(); ?>" /></a>
          <h6><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h6>
          <div class="excerpt_small"><?php the_excerpt(); ?></div>
            <div class="meta"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>
          <?php endwhile; ?>
        </div>
    </div>
        <?php } ?>
    	
    	
    <!-- LAST CATEGORY LISTING - NEEDED TO END CSS COLUMNS -->
    <?php
    // enter the IDs of the categories to display
    $display_categories = array(7);
    foreach ($display_categories as $category) { ?>
    <div class="column span-4 last">
    <div class="five_posts">
          <?php query_posts("showposts=1&cat=$category");
    	    $wp_query->is_category = false;
    		$wp_query->is_archive = false;
    		$wp_query->is_home = true;
    		 ?>
          <h4><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></h4>
    <hr></hr>
          <?php while (have_posts()) : the_post(); ?>
          
          <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php $key="small_photo"; echo get_post_meta($post->ID, $key, true); ?>" alt="Photo: <?php the_title(); ?>" /></a>
          <h6><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>" class="title"><?php the_title(); ?></a></h6>
          <div class="excerpt_small"><?php the_excerpt(); ?></div>
            <div class="meta"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></div>
          <?php endwhile; ?>
        </div>
    </div>
    </div>
        <?php } ?>
    <hr></hr>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Please help! Thanks!

  2. #2
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,467
    Hi there squarebyjia,

    there is nothing wrong with Safari, the problem is of your own making.
    In this CSS file...

    ...you have this...
    Code:
    
    body
    {
    	margin-bottom: 0;
    	background:url('images/sgbg.jpg');
    background-repeat:repeat-x, repeat-y;
    }
    
    
    ...which is, obviously, incorrect.
    Either remove it altogether or use...
    Code:
    
    background-repeat:repeat;
    
    coothead

  3. #3
    Join Date
    Jun 2009
    Posts
    9
    Oh my gosh! You're right!

    I am a self taught (and still learning) web designer and thought that "background-repeat:repeat-x, repeat-y;" was correct all along!

    Gee, thanks!

  4. #4
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,467
    No problem, you're very welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles