• 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 https://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]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Cal

    (@themesbycal)

    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("https://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

    Thread Starter cscivicque

    (@cscivicque)

    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" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="https://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 />
    Cal

    (@themesbycal)

    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.

    Thread Starter cscivicque

    (@cscivicque)

    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?

    Thread Starter cscivicque

    (@cscivicque)

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

    Cal

    (@themesbycal)

    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.

    Thread Starter cscivicque

    (@cscivicque)

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

    https://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(); ?>

    Cal

    (@themesbycal)

    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.

    Thread Starter cscivicque

    (@cscivicque)

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Header Off center – border issues’ is closed to new replies.