WEB Aligning an img in the header to the right side of the body.

Discussion in 'OT Technology' started by DieselUV, Jan 15, 2008.

  1. DieselUV

    DieselUV OT Supporter

    Joined:
    Aug 31, 2004
    Messages:
    20,924
    Likes Received:
    7
    Location:
    Fairfax, VA
    I'm trying to put an img in my header so that it lines up with the right side of the body. The way it is now, it moves when the browser is made smaller. I just need it to align to the right as the title does on the left.
     
  2. tryfuhl

    tryfuhl New Member

    Joined:
    Oct 4, 2003
    Messages:
    75,450
    Likes Received:
    0
    Location:
    MD/DC Metro
    It moves where? Pics? Code being used now?
     
  3. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    this does not make sense. do you have the image in <img> tags? or as a background image in your css?
     
  4. DieselUV

    DieselUV OT Supporter

    Joined:
    Aug 31, 2004
    Messages:
    20,924
    Likes Received:
    7
    Location:
    Fairfax, VA
  5. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    ok i see what you are trying to do. post the relevant code. thanks.
     
  6. DieselUV

    DieselUV OT Supporter

    Joined:
    Aug 31, 2004
    Messages:
    20,924
    Likes Received:
    7
    Location:
    Fairfax, VA
    This 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">



    <head profile="http://gmpg.org/xfn/11">

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <meta name="distribution" content="global" />

    <meta name="robots" content="index, follow" />

    <meta name="revisit-after" content="2 days" />

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

    <title><?php bloginfo('name'); wp_title(); ?></title>

    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/script_quicktags.js"></script>

    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <link rel="shortcut icon" href="<?php bloginfo('url'); ?>/favicon.ico" />

    <?php //comments_popup_script(); // off by default ?>

    <style type="text/css" media="screen">

    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->

    </style>



    <?php wp_head(); ?>



    </head>



    <body id="home" class="log">


    <div id="header">

    <div id="logo" onclick="location.href='<?php bloginfo('url'); ?>';">

    <h1><a title="<?php bloginfo('name'); ?>: Home" href="<?php bloginfo('siteurl'); ?>"><?php bloginfo('name'); ?></a></h1>

    <img style="position:absolute; RIGHT: 20px; TOP:4px" src="http://www.tysonsbusinesscenter.com/images/summitlogo.png">

    </div> <!-- [logo] -->



    <div id="topnav">

    <ul>

    <li><a title="Home" href="<?php bloginfo('url'); ?>">Home</a></li>

    <?php wp_list_pages('title_li=&depth=1'); ?>

    </ul>

    </div> <!-- [topnav] -->



    </div> <!-- [header] -->



    <div id="wrap">
     
  7. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    what you can do is put the image in a div, make it a background image, and then margin it from the right side until desired.
     
  8. DieselUV

    DieselUV OT Supporter

    Joined:
    Aug 31, 2004
    Messages:
    20,924
    Likes Received:
    7
    Location:
    Fairfax, VA
    see i'm using a theme and i just tinker by adding stuff. i have a little knowledge of html but i don't really know how to use div yet. got any good pages to learn?
     
  9. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    ive done some basic wordpress stuff for oters in the past. give me the login for your wordpress and ill go ahead and do it for you.
     
  10. DieselUV

    DieselUV OT Supporter

    Joined:
    Aug 31, 2004
    Messages:
    20,924
    Likes Received:
    7
    Location:
    Fairfax, VA
    pm'd
     
  11. tryfuhl

    tryfuhl New Member

    Joined:
    Oct 4, 2003
    Messages:
    75,450
    Likes Received:
    0
    Location:
    MD/DC Metro
    I have some tunnel pics like that myself :o

    I miss NoVA/DC
     

Share This Page