WordPress.org

Ready to get started?Download WordPress

Forums

Header Off center - border issues (10 posts)

  1. cscivicque
    Member
    Posted 6 years ago #

    I am very new at playing with CSS and I'm stuck. Hopefully someone can help with either (or both) of the below issues:
    My site is http://www.eatoolbox.com

    I am using the WordPress Default Theme.

    There is a thin border around the page that I can't seem to make disappear. In an attempt to deal with it, I tried to shorten the width of the header to allow it to go all the way up both sides of the page. However, this only shortened the width on one side of the header, allowing that thin border to show on the right side but not the left. This makes be think the header is left justified, but I can't see how to center it.

    Can someone help me to either: 1) center the header so the border will go all the way up on both sides. or 2) remove that thin border completely.
    I don't know if the whole CSS code is necessary for you to see, but here it is anyway: THANKS IN ADVANCE !!

    [moderated: no need to paste the ENTIRE style sheet into a post when every WP user has the Default theme]

  2. Cal
    Member
    Posted 6 years ago #

    think i found it

    open up your header.php file and delete this, make a backup copy first or be ready to undo if it doesn't work

    <style type="text/css" media="screen">
    
    	#page { background: url("http://eatoolbox.com/wp-content/themes/default/images/kubrickbg-ltr.jpg") repeat-y top; border: none; }
    
    </style>

    next time a link to your css file will be sufficient

    let me know if that does it

  3. cscivicque
    Member
    Posted 6 years ago #

    Thank you for responding! Here's my question now - I see the first part that you want me to delete -
    <style type="text/css" media="screen">
    but not the second part starting with #page. Is that in supposed to be in the header file or CSS?

    I think I misunderstood something? I'm sorry!

    Here is the Header.php file:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    <style type="text/css" media="screen">
    
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !$withcomments && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>
    
    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">
    
    <div id="header">
    	<div id="headerimg">
    		<h1><a>/"><?php bloginfo('name'); ?></a></h1>
    		<div class="description"><?php bloginfo('description'); ?></div>
    	</div>
    </div>
    <hr />
  4. Cal
    Member
    Posted 6 years ago #

    here's the code producing the border

    <style>
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !$withcomments && !is_single() ) {
    ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>

    try changing this to

    <style>
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !$withcomments && !is_single() ) {
    ?>
    	#page {  }
    
    <?php } else { // No sidebar ?>
    	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
    <?php } ?>
    
    </style>

    Otherwise, just try and delete the whole thing, make a backup copy first.

  5. cscivicque
    Member
    Posted 6 years ago #

    Opps - I see it now...but should I delete everything within that area? See above....there is info re: check for sidebar, etc. Do I just delete the portion you said?

  6. cscivicque
    Member
    Posted 6 years ago #

    YOU GUYS ARE AWESOME!!!!!!!!!!!!!!!! Seriously can't thank you enough! I am forever in your debt.
    Thank you thank you thank you.

  7. Cal
    Member
    Posted 6 years ago #

    I just edited my post as I had a slight error in my posting.

    I would just try and delete everything I put, between <style> and </style> in header.php and see what happens.

    Just put the code in a txt file and put it back if it does something unwanted.

  8. cscivicque
    Member
    Posted 6 years ago #

    so that worked for the front page. Any ideas about single post pages? They still have the border. Here's the code:

    http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
    /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
    on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
    and is filed under <?php the_category(', ') ?>.
    You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.

    <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Both Comments and Pings are open ?>
    You can leave a response, or " rel="trackback">trackback from your own site.

    <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Only Pings are Open ?>
    Responses are currently closed, but you can " rel="trackback">trackback from your own site.

    <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Comments are open, Pings are not ?>
    You can skip to the end and leave a response. Pinging is currently not allowed.

    <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Neither Comments, nor Pings are open ?>
    Both comments and pings are currently closed.

    <?php } edit_post_link('Edit this entry.','',''); ?>

    </small>
    </p>

    </div>
    </div>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>

    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

  9. Cal
    Member
    Posted 6 years ago #

    I'm pretty sure it's the same basic thing, just change in your header.......

    <style>
    <?php
    // Checks to see whether it needs a sidebar or not
    if ( !$withcomments && !is_single() ) {
    ?>
    	#page { }
    
    <?php } else { // No sidebar ?>
    	#page {  }
    <?php } ?>
    
    </style>

    Or, the equivalent would be to delete that whole section. Just delete the whole thing <style> to </style> per above.

  10. cscivicque
    Member
    Posted 6 years ago #

    Once again, you are my hero. Thank you for taking time on your weekend to help me.

Topic Closed

This topic has been closed to new replies.

About this Topic