Hallo,
ich möchte das Theme ein wenig am Header verändern. Das hat soweit auch schon gut geklappt. Leider gibt es aber ein paar Probleme. Im IE, Opera und Firefox sieht es jedesmal anders aus. Nur der Firefox zeigt es korrekt an (so wie ich es haben will). Wo ist jetzt hier der Fehler?
Auszug aus der style.css:
Code
#wrapper {
width: 770px;
margin: 0 auto;
position: relative;
}
/* ------------------------------------- header area */
#header {
width: 770px;
height: 90px;
}
/* site title */
h1 {
position: absolute;
top: 40px;
left: 25px;
color: #FFFFFF;
margin: 0;
padding: 0;
font: normal 30px/100% "Trebuchet MS", Arial, sans-serif;
}
h1 a, h1 a:visited {
color: #FFFFFF;
text-decoration: none;
}
h1 a:hover {
color: #000000;
text-decoration: none;
}
.description {
position: absolute;
top: 77px;
left: 25px;
color: #000000;
font: 12px Arial, Helvetica, sans-serif;
}
/* search form */
Alles anzeigen
und hier die header.php:
PHP
<!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'); ?>" />
<title><?php if(is_home()) { echo bloginfo('name'); } else { 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="all" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" type="text/css" media="print" />
<!-- Sidebar docking boxes (dbx) by Brothercake - http://www.brothercake.com/ -->
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx.js"></script>
<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/dbx-key.js"></script>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/dbx.css" media="screen, projection" />
<!--[if lt IE 7]>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie-gif.css" type="text/css" />
<![endif]-->
<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'); ?>" />
<?php wp_head(); ?>
</head>
<body>
<div id="page">
<div id="wrapper">
<div id="header">
<?php $y = get_option('siteurl'); $z =get_page_link (); if($y==$z or is_home ()) {?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/rounded_logo.gif" width="770" height="190" alt="Home of Frankies World" />
<?php } else { ?>
<a title="Home of Frankies World" href="<?php echo get_option('home'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rounded_logo.gif" width="770" height="190" alt="Home of Frankies World" /></a>
<?php } ?>
<div class="description"></div><?php include (TEMPLATEPATH . '/searchform.php'); ?>
</div>
<?php adsensem_ad('banner'); ?>
<!-- /header -->
<div id="left-col">
<div id="nav">
<ul>
<li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>/" title="Startseite">Startseite</a></li>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li=');?>
</ul>
</div><!-- /nav -->
<?php /* Menu for subpages of current page (thanks to K2 theme for this code) */
global $notfound;
if (is_page() and ($notfound != '1')) {
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
// if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) {
if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) {
?>
<div id="subnav">
<ul>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&child_of='. $parent_id); ?>
</ul>
</div><!-- /sub nav -->
<?php } } ?>
Alles anzeigen
Wenn ich mich damit besser auskennen würde, hätte ich den Fehler wahrscheinlich schon gefunden.:(
Bis jetzt wird die Grafik direkt in der header.php aufgerufen, das würde ich am liebsten ins Stylesheet packen. Was muss ich da ändern?