PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
Design für Wordpress - Sidebars verschieben sich?!
Beitrag
<blockquote data-quote="cHrIzZz" data-source="post: 1434134" data-attributes="member: 12390"><p><strong>AW: Design für Wordpress - Sidebars verschieben sich?!</strong></p><p></p><p>Das Problem kommt von der Größe der Sidebars...</p><p></p><p>Setze ich sie auf eine Größe von</p><p>[code]</p><p>div.sidebar {</p><p>float:left;</p><p>overflow:hidden;</p><p>width:160px;</p><p>}</p><p>[/code]</p><p></p><p>Dann habe ich: SIDEBAR LEFT | CONTENT | SIDEBAR RIGHT</p><p></p><p>Also so, wie ich es gerne haben möchte...Sprich irgendwo stimmt was mit der width nicht.</p><p></p><p>Hier mal der aufgeräumte Code.</p><p></p><p>[code]</p><p>body {</p><p> background-color: #fff;</p><p> background-image: none;</p><p> color: #000;</p><p> font: .8em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;</p><p>}</p><p></p><p>div#header {</p><p> background: url(img/logo_autofitsk.jpg) no-repeat;</p><p> width: 960px;</p><p> height: 280px;</p><p>}</p><p></p><p>div#header img {</p><p> padding-top: 96px;</p><p>}</p><p></p><p>div#wrapper {</p><p> width: 960px;</p><p> margin-right: auto;</p><p> margin-left: auto;</p><p> margin-top: 5px;</p><p></p><p>}</p><p></p><p>div#container {</p><p>float:left;</p><p>width:960px;</p><p>}</p><p></p><p>div#content {</p><p>margin:0 207px;</p><p>padding-right: 3px;</p><p>padding-left: 3px;</p><p>padding-top: 10px;</p><p>background: #ececec url(../img/border.jpg) repeat-x;</p><p>height: 500px;</p><p>}</p><p></p><p>div.sidebar {</p><p>float:left;</p><p>overflow:hidden;</p><p>width:200px;</p><p>}</p><p></p><p>div#primary {</p><p> margin:0 0 0 -100%;</p><p> padding-right: 3px;</p><p> padding-left: 3px;</p><p> padding-top: 10px;</p><p> background: #ececec url(img/border.jpg) repeat-x;</p><p>height: 500px;</p><p>}</p><p></p><p>* html div#primary {</p><p>left:20px;</p><p>position:relative;</p><p>}</p><p></p><p>div#secondary {</p><p>margin:0 0 0 -200px;</p><p>padding-right: 3px;</p><p>padding-left: 3px;</p><p>padding-top: 10px;</p><p>background: #ececec url(../img/border.jpg) repeat-x;</p><p>height: 500px;</p><p>}</p><p></p><p>div#footer {</p><p>clear:left;</p><p>width:100%;</p><p>}</p><p>[/code]</p><p></p><p>Und hier der Code der index.php aus dem Wordpress theme</p><p></p><p>[code]</p><p><?php get_header() ?></p><p></p><p> <div id="container"></p><p> <div id="content"></p><p></p><p> <div id="nav-above" class="navigation"></p><p> <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'sandbox' )) ?></div></p><p> <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'sandbox' )) ?></div></p><p> </div></p><p></p><p><?php while ( have_posts() ) : the_post() ?></p><p></p><p> <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"></p><p> <h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'sandbox'), the_title_attribute('echo=0') ) ?>" rel="bookmark"><?php the_title() ?></a></h2></p><p> <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php unset($previousday); printf( __( '%1$s ? %2$s', 'sandbox' ), the_date( '', '', '', false ), get_the_time() ) ?></abbr></div></p><p> <div class="entry-content"></p><p><?php the_content( __( 'Read More <span class="meta-nav">&raquo;</span>', 'sandbox' ) ) ?></p><p></p><p> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?></p><p> </div></p><p> <div class="entry-meta"></p><p> <span class="author vcard"><?php printf( __( 'By %s', 'sandbox' ), '<a class="url fn n" href="' . get_author_link( false, $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( __( 'View all posts by %s', 'sandbox' ), $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></span></p><p> <span class="meta-sep">|</span></p><p> <span class="cat-links"><?php printf( __( 'Posted in %s', 'sandbox' ), get_the_category_list(', ') ) ?></span></p><p> <span class="meta-sep">|</span></p><p> <?php the_tags( __( '<span class="tag-links">Tagged ', 'sandbox' ), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?></p><p><?php edit_post_link( __( 'Edit', 'sandbox' ), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?></p><p> <span class="comments-link"><?php comments_popup_link( __( 'Comments (0)', 'sandbox' ), __( 'Comments (1)', 'sandbox' ), __( 'Comments (%)', 'sandbox' ) ) ?></span></p><p> </div></p><p> </div><!-- .post --></p><p></p><p><?php comments_template() ?></p><p></p><p><?php endwhile; ?></p><p></p><p> <div id="nav-below" class="navigation"></p><p> <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'sandbox' )) ?></div></p><p> <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'sandbox' )) ?></div></p><p> </div></p><p></p><p> </div><!-- #content --></p><p> <?php get_sidebar() ?></p><p> </div><!-- #container --></p><p></p><p><?php get_footer() ?></p><p>[/code]</p><p></p><p>Und hier die sidebar.php</p><p></p><p>[code]</p><p> <div id="primary" class="sidebar"></p><p> <ul class="xoxo"></p><p><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : // begin primary sidebar widgets ?></p><p></p><p> <li id="pages"></p><p> <h3><?php _e( 'Pages', 'sandbox' ) ?></h3></p><p> <ul></p><p><?php wp_list_pages('title_li=&sort_column=menu_order' ) ?></p><p> </ul></p><p> </li></p><p></p><p> <li id="categories"></p><p> <h3><?php _e( 'Categories', 'sandbox' ) ?></h3></p><p> <ul></p><p><?php wp_list_categories('title_li=&show_count=0&hierarchical=1') ?> </p><p></p><p> </ul></p><p> </li></p><p></p><p> <li id="archives"></p><p> <h3><?php _e( 'Archives', 'sandbox' ) ?></h3></p><p> <ul></p><p><?php wp_get_archives('type=monthly') ?></p><p></p><p> </ul></p><p> </li></p><p><?php endif; // end primary sidebar widgets ?></p><p> </ul></p><p> </div><!-- #primary .sidebar --></p><p></p><p> <div id="secondary" class="sidebar"></p><p> <ul class="xoxo"></p><p><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : // begin secondary sidebar widgets ?></p><p> <li id="search"></p><p> <h3><label for="s"><?php _e( 'Search', 'sandbox' ) ?></label></h3></p><p> <form id="searchform" class="blog-search" method="get" action="<?php bloginfo('home') ?>"></p><p> <div></p><p> <input id="s" name="s" type="text" class="text" value="<?php the_search_query() ?>" size="10" tabindex="1" /></p><p> <input type="submit" class="button" value="<?php _e( 'Find', 'sandbox' ) ?>" tabindex="2" /></p><p> </div></p><p> </form></p><p> </li></p><p></p><p><?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&show_images=1') ?></p><p></p><p> <li id="rss-links"></p><p> <h3><?php _e( 'RSS Feeds', 'sandbox' ) ?></h3></p><p> <ul></p><p> <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php printf( __( '%s latest posts', 'sandbox' ), wp_specialchars( get_bloginfo('name'), 1 ) ) ?>" rel="alternate" type="application/rss+xml"><?php _e( 'All posts', 'sandbox' ) ?></a></li></p><p> <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php printf( __( '%s latest comments', 'sandbox' ), wp_specialchars( get_bloginfo('name'), 1 ) ) ?>" rel="alternate" type="application/rss+xml"><?php _e( 'All comments', 'sandbox' ) ?></a></li></p><p> </ul></p><p> </li></p><p></p><p> <li id="meta"></p><p> <h3><?php _e( 'Meta', 'sandbox' ) ?></h3></p><p> <ul></p><p> <?php wp_register() ?></p><p></p><p> <li><?php wp_loginout() ?></li></p><p> <?php wp_meta() ?></p><p></p><p> </ul></p><p> </li></p><p><?php endif; // end secondary sidebar widgets ?></p><p> </ul></p><p> </div><!-- #secondary .sidebar --></p><p>[/code]</p></blockquote><p></p>
[QUOTE="cHrIzZz, post: 1434134, member: 12390"] [b]AW: Design für Wordpress - Sidebars verschieben sich?![/b] Das Problem kommt von der Größe der Sidebars... Setze ich sie auf eine Größe von [code] div.sidebar { float:left; overflow:hidden; width:160px; } [/code] Dann habe ich: SIDEBAR LEFT | CONTENT | SIDEBAR RIGHT Also so, wie ich es gerne haben möchte...Sprich irgendwo stimmt was mit der width nicht. Hier mal der aufgeräumte Code. [code] body { background-color: #fff; background-image: none; color: #000; font: .8em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; } div#header { background: url(img/logo_autofitsk.jpg) no-repeat; width: 960px; height: 280px; } div#header img { padding-top: 96px; } div#wrapper { width: 960px; margin-right: auto; margin-left: auto; margin-top: 5px; } div#container { float:left; width:960px; } div#content { margin:0 207px; padding-right: 3px; padding-left: 3px; padding-top: 10px; background: #ececec url(../img/border.jpg) repeat-x; height: 500px; } div.sidebar { float:left; overflow:hidden; width:200px; } div#primary { margin:0 0 0 -100%; padding-right: 3px; padding-left: 3px; padding-top: 10px; background: #ececec url(img/border.jpg) repeat-x; height: 500px; } * html div#primary { left:20px; position:relative; } div#secondary { margin:0 0 0 -200px; padding-right: 3px; padding-left: 3px; padding-top: 10px; background: #ececec url(../img/border.jpg) repeat-x; height: 500px; } div#footer { clear:left; width:100%; } [/code] Und hier der Code der index.php aus dem Wordpress theme [code] <?php get_header() ?> <div id="container"> <div id="content"> <div id="nav-above" class="navigation"> <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'sandbox' )) ?></div> <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'sandbox' )) ?></div> </div> <?php while ( have_posts() ) : the_post() ?> <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>"> <h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'sandbox'), the_title_attribute('echo=0') ) ?>" rel="bookmark"><?php the_title() ?></a></h2> <div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php unset($previousday); printf( __( '%1$s ? %2$s', 'sandbox' ), the_date( '', '', '', false ), get_the_time() ) ?></abbr></div> <div class="entry-content"> <?php the_content( __( 'Read More <span class="meta-nav">»</span>', 'sandbox' ) ) ?> <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?> </div> <div class="entry-meta"> <span class="author vcard"><?php printf( __( 'By %s', 'sandbox' ), '<a class="url fn n" href="' . get_author_link( false, $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( __( 'View all posts by %s', 'sandbox' ), $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></span> <span class="meta-sep">|</span> <span class="cat-links"><?php printf( __( 'Posted in %s', 'sandbox' ), get_the_category_list(', ') ) ?></span> <span class="meta-sep">|</span> <?php the_tags( __( '<span class="tag-links">Tagged ', 'sandbox' ), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?> <?php edit_post_link( __( 'Edit', 'sandbox' ), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?> <span class="comments-link"><?php comments_popup_link( __( 'Comments (0)', 'sandbox' ), __( 'Comments (1)', 'sandbox' ), __( 'Comments (%)', 'sandbox' ) ) ?></span> </div> </div><!-- .post --> <?php comments_template() ?> <?php endwhile; ?> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'sandbox' )) ?></div> <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'sandbox' )) ?></div> </div> </div><!-- #content --> <?php get_sidebar() ?> </div><!-- #container --> <?php get_footer() ?> [/code] Und hier die sidebar.php [code] <div id="primary" class="sidebar"> <ul class="xoxo"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : // begin primary sidebar widgets ?> <li id="pages"> <h3><?php _e( 'Pages', 'sandbox' ) ?></h3> <ul> <?php wp_list_pages('title_li=&sort_column=menu_order' ) ?> </ul> </li> <li id="categories"> <h3><?php _e( 'Categories', 'sandbox' ) ?></h3> <ul> <?php wp_list_categories('title_li=&show_count=0&hierarchical=1') ?> </ul> </li> <li id="archives"> <h3><?php _e( 'Archives', 'sandbox' ) ?></h3> <ul> <?php wp_get_archives('type=monthly') ?> </ul> </li> <?php endif; // end primary sidebar widgets ?> </ul> </div><!-- #primary .sidebar --> <div id="secondary" class="sidebar"> <ul class="xoxo"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : // begin secondary sidebar widgets ?> <li id="search"> <h3><label for="s"><?php _e( 'Search', 'sandbox' ) ?></label></h3> <form id="searchform" class="blog-search" method="get" action="<?php bloginfo('home') ?>"> <div> <input id="s" name="s" type="text" class="text" value="<?php the_search_query() ?>" size="10" tabindex="1" /> <input type="submit" class="button" value="<?php _e( 'Find', 'sandbox' ) ?>" tabindex="2" /> </div> </form> </li> <?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&show_images=1') ?> <li id="rss-links"> <h3><?php _e( 'RSS Feeds', 'sandbox' ) ?></h3> <ul> <li><a href="<?php bloginfo('rss2_url') ?>" title="<?php printf( __( '%s latest posts', 'sandbox' ), wp_specialchars( get_bloginfo('name'), 1 ) ) ?>" rel="alternate" type="application/rss+xml"><?php _e( 'All posts', 'sandbox' ) ?></a></li> <li><a href="<?php bloginfo('comments_rss2_url') ?>" title="<?php printf( __( '%s latest comments', 'sandbox' ), wp_specialchars( get_bloginfo('name'), 1 ) ) ?>" rel="alternate" type="application/rss+xml"><?php _e( 'All comments', 'sandbox' ) ?></a></li> </ul> </li> <li id="meta"> <h3><?php _e( 'Meta', 'sandbox' ) ?></h3> <ul> <?php wp_register() ?> <li><?php wp_loginout() ?></li> <?php wp_meta() ?> </ul> </li> <?php endif; // end secondary sidebar widgets ?> </ul> </div><!-- #secondary .sidebar --> [/code] [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
Design für Wordpress - Sidebars verschieben sich?!
Oben