Nie działa background
-
Witam
Potrzebuję pomocy z szablonem, mianowicie wygląda tak. Dodałem Widget i wszystko się pozmieniało. Chciałbym, aby container.png wyświetlało się w tle w całości. Prawdopodobnie gdzieś popełniłem błąd, diabeł tkwi w szczegółach. Siedzę nad tym 5 h i dalej nie mogę sobie poradzić. Proszę o pomoc. Prawdopodobnie muszę coś zrobić z widgetem, tylko nie bardzo wiem co.style.css
/* Theme Name: IThunters */ body { font-family: Arial, Helvetica, sans-serif; font-size: 14px; background: white; } .clear { clear: both; } #page { width: 1000px; margin: auto; } #header { position: relative; background-color: #F4F4F4; height:170px; } #logo { display: block; width: 500px; height:170px; background: url(img/logo.png) no-repeat; background-position: 10px 10px; } #proc { display:block; width: 500px; height:170px; background: url(img/proc.png) no-repeat; background-position: 100px -24px; } #rss { display: block; width: 34px; height: 35px; background: url(img/rss.png) no-repeat; position: absolute; top: 3px; right: 10px; } #navbar { height: 60px; background: url(img/navbar.png) no-repeat ; background-size:contain; margin-top:1px; position: relative; } #fb {display: block; width: 34px; height: 35px; background: url(img/fb.png) no-repeat; position: absolute; top: 3px; right: 48px; } #tw {display: block; width: 34px; height: 35px; background: url(img/twitter.png) no-repeat; position: absolute; top: 3px; right: 90px; } #navbar div#mainnav ul { position: absolute; top: 10px; left: 18px; } #navbar div#mainnav li { float: left; font-size: 18px; margin-right: 20px; } #navbar div#mainnav li a { color: black; text-decoration: none; } #navbar div#mainnav a:hover { color: #004070; } #container { background: url(img/content.png) ;background-size:auto; padding-top: 48px; background-size:cover; } #content { width: 700px; float: left; padding-left: 13px; margin-right: 20px; } form{width:500px; margin:0 0 0 650px; } .search { width:110px; height:18px; padding:10px 10px; margin:2px 0 0 0 ;background: url(img/search.png) no-repeat ; background-size:cover; border-radius:10px; -moz-border-radius:10px;-webkit-border-radius:10px;} .lighter input[type=text]{ border:1px solid #d0d0d0;background-color:#fcfcfc;} #search-button {position:absolute; left:772px; background:url(img/btnSearch.png) no-repeat ; height:28px; width:65px; background-size:cover; font-size: 14px;color: #F4F4F4 ;cursor: pointer; top:7px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; } #sidebar { width: 260px; height:500px; float: left; } .entry { margin-bottom: 60px; } .entry h1 { font-size: 18px; font-weight: normal; margin-bottom: 4px; } .entry h1 a { color: black; text-decoration: none; } .entry p.entry-date { font-size: 12px; margin-bottom: 8px; } .entry img.entry-thumb { float: left; margin-right: 10px; } .entry p { line-height: 19px; margin-top: 5px; } .entry a.more-link { color: #D40900; text-decoration: none; } .entry a { color: #D40900; text-decoration: none; } .widget { margin-bottom: 40px; } .widget h2 { font-size: 18px; font-weight: normal; margin-bottom: 10px; } .widget p { line-height: 19px; margin-top: 5px; } .widget a { color: #D40900; text-decoration: none; } #footer { margin-top: 60px; height:47px ; background: url(img/footer.png); background-size:contain; } #footer p { font-size: 12px; text-align:center; font-weight:bold; } #header ul, ul li { display: block; list-style: none; margin: 0; padding: 0; } #header ul li { float: left; width:500px; } #header ul a:link, ul a:visited { text-decoration: none; display: block; text-align: center; color: #777; } #header ul a:hover { color: #000; }
indnex.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl"> <head> <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="<?php bloginfo( 'template_url' ); ?>/reset.css" type="text/css" /> <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" /> <?php wp_head(); ?> </head> <body> <div id="page"> <div id="header"> <ul> <li><a id="logo" href="<?php bloginfo( 'home' ); ?>"></a> </li><!-- end logo --> <li><a id="proc" href=""></a></li> </ul> </div> <!-- end header --> <div id="navbar"> <div id="mainnav"> <?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'depth' => 1)); ?> </div> <a id="rss" href="<?php bloginfo_rss( 'rss_url' ) ?>"></a> <a id="fb" href=""></a> <a id="tw" href=""></a> <div class="lighter"> <form><span><input type="text" id="s" class="search"><button id='search-button' type='submit'><span>Szukaj</span></button></form> </div> </div> <!-- end navbar --> <div id="container"> <div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="entry"> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <p class="entry-date"><?php the_time('d-m-Y'); ?></p> <a href="<?php the_permalink(); ?>"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'single-post', array('class' => 'entry-thumb') ); } ?> </a> <?php the_content('czytaj dalej'); ?> <div class="clear"></div> </div> <!-- end entry --> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div> <!-- end content --> <div id="sidebar"> <?php /* Widgetized sidebar, if you have the plugin installed. */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <div class="widget"> <h2>Domyślny widget</h2> <p>Ten widget będzie się pokazywał gdy żaden inny widget nie zostanie dodany do paska.</p> </div> <!-- end widget --> <?php endif; ?> </div> <!-- end sidebar --> </div> <!-- end container --> <div class="clear"></div> </div> <!-- end page --> <?php wp_footer() ?> </body> </html>
function.php
<?php function register_my_menus() { register_nav_menus( array( 'header-menu' => __( 'Header Menu' )) ); } add_action( 'init', 'register_my_menus' ); if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name'=>'Sidebar-right', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name'=>'Footer Left', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name'=>'Head', 'before_widget' => '<div>', 'after_widget' )); } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
-
</div> <!-- end container --> <div class="clear"></div>
Zamień te linie miejscami.
Wielkie dzięki…wszystko działa ;D
Viewing 2 replies - 1 through 2 (of 2 total)
- Temat ‘Nie działa background’ jest zamknięty na nowe odpowiedzi.