div problem

Discussion in 'CSS' started by xxsAm, May 18, 2007.

  1. #1
    Working on a theme for a friend. It can be found here: samdaves [.] com/blog

    The div is currently set to absolute position. How do i get it so that the blog title moves with the header when the browser is resized? I have included the header.php code below:

    <!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="text/html; charset=iso-8859-1" />
    
    	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />	
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->
    
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    	<?php wp_get_archives('type=monthly&format=link'); ?>
    	<?php //comments_popup_script(); // off by default ?>
    	<?php wp_head(); ?>
    </head>
    
    
    <body>
    <div id="wrapper">
    <div>
    <a href="<?PHP bloginfo("url");?>"><img class="banner" src="<?PHP bloginfo('template_directory');?>/images/header.jpg" width="704" height="146" border="none" alt="" /></a>
    </div>
    <div style="position: fixed; left: 201px; top: 59px;">
    <h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1></div>
    Code (markup):
     
    xxsAm, May 18, 2007 IP
  2. deques

    deques Peon

    Messages:
    206
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you dont. not if you use absolute positioning. its already set to use the same position no matter what window size it has.

    to make it move, try position: relative. the box will be relative positioned to the parent element
     
    deques, May 18, 2007 IP
    xxsAm likes this.
  3. xxsAm

    xxsAm Active Member

    Messages:
    464
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    60
    #3
    thanks its fixed.
     
    xxsAm, May 18, 2007 IP