Jump to content

Recommended Posts

can centre the theme fine in Firefox, but not so great in IE. All of the DIVs fill the page horizontally, and dont centre. Below is all my code:

 

header.php:

<html>
<head>
<title></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">

</head>

<body>

<div id="header">
<h1><img src="../../../../templogo.gif" width="497" height="297" alt="Logo"></h1>
</div>

 

index.php:

<?php get_header(); ?>

<div id="main">

	<div id="content">

		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

			<h1><?php the_title(); ?></h1>
			<h6>Posted on <?php the_time('F j, Y') ?></h6>
			<p><?php the_content(__('(more...)')); ?></p>
			<hr>

			<?php endwhile; else: ?>
				<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
		<?php endif; ?>

	</div>

	<?php get_sidebar(); ?>

</div>

<div id="both"></div>

<?php get_footer(); ?>

 

sidebar.php:

		<div id="sidebar">
		<div class="title">About</div>
		<p>This is a demo</p>
	</div>

 

footer.php:

	<div id="footer">
	<h1>FOOTER</h1>
</div>

</div>

</body>
</html>

 

style.css:

* {
margin: 0;
}

body {
background-color:#9b9b9b;
width:982px;
margin-left:auto;
margin-right:auto;
display: block; 

}


#header {
border: 2px #00ff00 solid;
padding:0px;
}

#header h1 {padding-top:20px; margin:0px;}


#content {
border: 2px #ff0000 solid;
float: left;
margin-top:10px;
padding:0 10px 10px 10px;
}

#content h6 {margin-bottom:10px;}

#content p { padding-left:30px;}

#sidebar {
margin-top:10px;
padding: 5px;
width: 22%;
border: 2px #ffff00 solid;
float: right;
}

#both {
clear: both;
}

#footer {
margin-top:10px;
border: 2px #0000ff solid;
}

.title {
font-size: 11pt;
font-family: verdana;
font-weight: bold;
}

 

Ive set the width of the body to be 982px and set margin-left and margin-right of the body to auto.

 

As i said before, it works fine in FF but not IE!

 

Can someone please help.

 

Thanks

Lucy

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.