Hallo,
ich fange gerade an mich ein bischen mit Wordpress zu beschäftigen.
Ich wollte auf meinem Blog einen wechselnden Hintergrund integrieren..
Leider ... ist bis jetzt noch nichts brauchbares herrausgekommen.Der Hintergrund ist permanent weiß, ich habe aus der style.css den Hintergrund, sowie die Hintergrundsfarbe herraus genommen.
hier einmal meine header.php
schonmal danke im vorraus
PHP
/*
Theme Name: Paste Up
Theme URI: [URL]http://emuman.org/themes[/URL]
Description: nice little theme.
Version: 0.2
Author: Sebastian Laube
Author URI: [URL]http://emuman.org/[/URL]
The CSS, XHTML and design is released under GPL:
[URL]http://www.opensource.org/licenses/gpl-license.php[/URL]
Feel free to contact me if you have questions,my email: [EMAIL="mail@emuman.org"]mail@emuman.org[/EMAIL]
*/
html, body {
font-size: 90%;
font-family: akzidenz-grotesk pro, arial, helvetica, sans-serif;
margin: 0;
padding: 0;
height: 100%;
}
<style type="text/css">
<?php
// Array init
$bgimg_array=array(
array ('images/1.gif'),
array ('images/2.gif'),
array ('images/3.gif'),
);
//shuffle array
shuffle($bgimg_array);
?>
#page {
background-image('<?php echo get_bloginfo('template_url') . $bgimg_array[0] ?>');
}
</style>
html {
background-image:url('<?php echo $bgimg_array[0][0] ?>');
background-color:<?php echo $bgimg_array[0][1] ?>;
background-repeat: no-repeat;
}
#container {
width: 70%;
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -2.8em; /* the bottom margin is the negative value of the footer's height */
}
#hiddennav, #head #submit { display: none;}
p { padding: 0.2em;}
.disnav { float: right;}
p.disnav { background: #333; padding: 0.2em;}
a, a:link {
color: #009de2;
text-decoration: none;
padding: 0.1em;
}
a:hover {
color: #fff;
background: #009de2;
border-top: 1px dotted #333;
}
/** head **/
#head {
background: url('images/hbg.png') 0 -3em no-repeat;
padding: 0.5em 0.5em 0 0.5em;
height: 8em;
margin-bottom: 0;
}
#head h1 {
font-size: 2em;
margin: 2.6em 0 0 0;
padding: 0;
float: left;
display: inline;
}
#head h1 a, #head h1 a:hover {
color: #009de2;
background: none;
border: 0;
}
/** searchbar **/
#searchbar {
float: right;
margin: 4.8em 0 0 0;
}
#searchbar input {
background: #222;
color: #fff;
border: 1px solid #222;
}
#searchbar input[type=text] {
background: #222 url('images/search.png') 1px 1px no-repeat;
padding: 1px;
text-align:right;
}
#search { display: none;}
/** nav **/
#menu {
width: 90%;
background: #222;
margin: 0 auto;
padding: 0.5em;
}
#menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#menu ul li {
display: inline;
}
#menu a {
color: #fff;
font-weight: 600;
text-decoration: none;
padding: 0.4em;
}
#menu a:hover {
color: #333;
background: #009de2;
}
/** subnav**/
.navigation {
display: block;
text-align: center;
margin-bottom:30px;
}
.alignright {
float: right;
background: #333;
padding: 0.2em;
}
.alignleft {
float: left;
background: #333;
padding: 0.2em;
}
/** cnt **/
#content {
clear: both;
margin: 1em 0 1em 0.8em;
float: left;
width: 77%;
}
#content h3 {
font-size: 1.5em;
margin: 1em 0 0.6em -0.3em;
}
#content .data {
margin-bottom: 0.22em;
}
#content .data p, #content .postmetadata p {
background: #ffffff;
display: inline;
padding: 0.2em;
line-height: 120%;
}
#content .postmetadata p { background: #333;}
#content .storycontent {
background: #222;
}
#content .storycontent p{
line-height: 145%;
display: block;
margin: 0.1em 0 0 0;
}
.postmetadata { margin-top: 0.3em;}
#content h3 a {
color: #fff;
background: #333;
font-style: normal;
text-decoration: none;
padding: 0.3em;
}
#content h3 a:hover {
color: #000;
background: #009de2;
border-top: 1px dotted #333;
}
* h3 em{
color: #fff;
background: #333;
font-style: normal;
text-decoration: none;
padding: 0.3em;
}
.badge{
float: right;
margin: 0.3em;
padding-top: 1em;
}
/** side **/
#side {
float: right;
text-align: right;
width: 17%;
min-width: 120px;
background: #222 url('images/mbg.png');
padding: 0.5em;
margin: 3em 0 0 0;
font-size: 110%;
}
#side h4 {
color: #222;
font-size: 1.5em;
margin: 1em 0 0.1em 0;
}
#side ul, #side * ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#side * li {
margin: 0.3em 0.1em;
}
#side a, #side a:link {
color: #222;
padding: 0.1em;
text-decoration: none;
}
#side a:hover {
color: #000;
background: #009de2;
border-top: 1px dotted #333;
}
#side #meta a, #side #meta li { background: none; padding: 0; margin: 0;}
/** comments **/
#comments {
clear: right;
background: #000;
padding: 0.3em 1em;
}
#comments * p {
background: none;
}
#comments * li {
margin: 0.4em 0;
}
#comments * li p{
display: block;
line-height: 100%;
background:#333;
margin: 0.2em 0 0 0;
width: 90%;
}
textarea, input {
background: #222;
border: 0;
margin: 0.1em;
color: #fff;
}
textarea {padding: 0.1em;}
/** pages **/
.entrytext {
background: #222;
padding: 0.6em;
}
.entrytext p {
}
/** foot **/
#footer {
/* position: fixed;
bottom: 0;*/
clear: both;
width: 70%;
background: #444;
padding: 0.2em;
margin: 0 auto;
font-size: 80%;
text-align: center;
border-top: 3px dotted #666;
}
#footer p {
margin: 0;
padding: 0;
}
#footer, .push {
height: 2.8em; /* .push must be the same height as .footer */
}
/** least **/
blockquote {
background: url('images/bbg.png') 0 0 no-repeat;
padding: 5px;
}
blockquote p {
padding-left: 30px;
}
#content img {
margin: 0 .5em .5em .5em;
}
hr {
background: #666;
height: 1px;
width: 97%;
border: 0;
margin: 1.2em 0 1.2em 0;
}
h4 { font-size: 130%; }
dt { font-weight: 700; margin-top:1.2em; }
dd { margin-left: 0.7em; margin-top: 0.3em;}
#answerdiv p{ padding-left: 0;}}
Alles anzeigen