I have a big problem with Dynamic Sidebar…
-
Hi!
I have created a Dynamic Sidebar to my word-press homepage. I want to use different sidebars depending on which page you intent to visit.
I made it work and it changes sidebar exactly as I it should but my big problem is that I can’t make it work with the right appearance. I want it to have the same style as my theme. Can anyone help me with settings for that??? I have really tried looking at diffrent forums but i haven’t got it to work yet.
You find my page here: https://tompe.com/bloggit
If you click on my ”test” or ”ny” you can see what I mean. Doesn’t look good at all.
<?php // The first sidebar if(function_exists('register_sidebar')) register_sidebar(array( 'name' => 'Sidebar One', // The sidebar name to register 'before_widget' => '<li id="%1$s" class="sidebaritem">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); // The second sidebar if(function_exists('register_sidebar')) register_sidebar(array( 'name' => 'Sidebar Two', // The sidebar name to register 'before_widget' => '<li id="%1$s" class="sidebaritem">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); // The third sidebar if(function_exists('register_sidebar')) register_sidebar(array( 'name' => 'Sidebar Three', // The sidebar name to register 'before_widget' => '<li id="%1$s" class="sidebaritem">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); ?>
And this is my style.css
/* Theme Name: Vistalicious Theme URI: https://dailyblogtips.com/vistalicious-wordpress-theme-released/ Description: WP theme with a Vista twist Author: Daily Blog Tips Author URI: https://www.dailyblogtips.com/wordpress-themes/ Version: 1.2 Tags:green color, right sidebar, one column, fixed width */ /* Reset Defaults Starts */ * { margin: 0; padding: 0; } h1, h2, h3, h4, h5, h6, p, blockquote { margin: 0; padding: 10px; } a { color: #256B7F; } a:hover { color: #6B8B45; } blockquote { margin: 5px 10px; padding: 5px 10px; background: #9DCAE8; border: 1px dotted #BBB; } code { color: #3366CC; } a img { border: none; } /* Reset Defaults Ends */ body { position: relative; /* Fixes browser resizing bug in IE6 */ margin: 27px auto 10px auto; width: 950px; font-family: arial, sans-serif; text-align: center; /* IE Centering Technique */ background: #499F8F url(images/bgbody2.jpg) repeat-x top left; background-attachment: fixed; } #wrapper { text-align: left; /* IE Centering Technique */ } .topcurvewhite { margin: 0; height: 13px; background: url(images/bgtopwhite.gif) left top no-repeat; } .bottomcurvewhite { margin: 0; height: 13px; background: url(images/bgbottomwhite.gif) left bottom no-repeat; } #header { margin: 0; padding: 5px 0 25px 0; } #header h1.sitename { padding: 0 0 0 0; position: relative; font-size: 20pt; } #header h1.sitename a { color: #fff; text-decoration: none; } #header h1.sitename a:hover { color: #D0DE9C; text-decoration: none; } #header h2.sitedesc { padding: 0 0 0 0; position: relative; font-size: 11pt; color: #A6DDEA; } #header .topright { float: right; position: relative; margin: 5px 0 0 0; padding: 0; width: 400px; height: 60px; text-align: right; color: #fff; font-size: 10pt; } #header .topright a { color: #A6DDEA; } #header .topright a:hover { color: #D0DE9C; } .search { padding-bottom: 5px; } #searchform { float: right; margin-left: 0; margin-top: 2px; margin-right: 0px; } #searchform { margin-left: 10px; width: 213px; padding-top: 8px; height: 28px; background: #ccc; background: url(images/search.gif) left 3px no-repeat; } *:first-child+html #searchform { /* Filter for IE7 */ padding: 5px 0; } * html #searchform { /* Filter for IE6 */ padding: 5px 0; } #searchbox { margin-left: 8px; margin-bottom: 3px; width: 145px; background: none; border: none; } #searchbutton { width: 50px; background: none; border: none; } #searchbutton:hover { cursor: pointer; } #nav { clear: both; margin: 10px 0 0 0; } #nav ul { margin: 0; padding: 0; list-style: none; } #nav li { float: left; margin-right: 10px; } * html #nav li a { /* Filter for IE6 to prevent li stacking */ float: left; text-decoration: none; } * html #nav li a span { /* Filter for IE6 to prevent li stacking */ float: left; margin-left: 4px; text-decoration: none; } #nav li a { display: block; height: 26px; background: url(images/bgtableft.gif) left top no-repeat; text-transform: lowercase; font-size: 10pt; text-decoration: none; } #nav li a span { display: block; margin-left: 6px; padding-left: 5px; padding-right: 12px; line-height: 26px; color: #FFF; background: url(images/bgtabright.gif) right top no-repeat; text-decoration: none; } #nav li a:hover { background-position: left -26px; text-decoration: none; cursor: pointer; /* For IE6 */ } #nav li a:hover span { background-position: right -26px; color: #fff; } #nav li.current_page a { background-position: left -26px; } #nav li.current_page a span { background-position: right -26px; color: #fff; } #main { clear: both; width: 925px; /* Overrides miscalculation in IE6; ignored by other browsers. */ margin: 0; padding: 0 15px 15px 10px; background: #fff url(images/bgwhite.gif) repeat-y top left; } #contentwrapper { float: left; width: 600px; } #content { } #content .pageTitle { padding: 5px 10px 15px 10px; font-size: 16pt; font-family: arial, sans serif; letter-spacing: -1px; color: #5A7836; } .post { margin: 5px 0 25px 0; } #content h2, #content h3, #content h4, #content h5, #content h6 { padding: 0 10px; font-weight: bold; } #content h2 { font-size: 15pt; } #content h3 { font-size: 11pt; } #content h4, #content h5, #content h6 { font-size: 10pt; } h2.homeTitle { margin: 0 0 15px 0; } h2.postTitle { padding: 0 10px; font-size: 16pt; font-weight: bold; color: #000; font-family: arial, sans serif; letter-spacing: -1px; } h2.postTitle a { font-size: 15pt; font-weight: bold; text-decoration: none; color: #11414F; } h2.postTitle a:hover { color: #5A7836; } .postMeta { padding: 2px 10px 3px 10px; font-size: 9pt; color: #333; } .postMeta a { text-decoration: none; } .postContent img { margin: 10px; border: 3px solid #CCC; } #content p, .postContent p { padding: 5px 10px; font-size: 10pt; color: #000; } .postContent ul, ol { padding: 0 0 0 35px; } .postContent ul li, ol li { font-size: 10pt; color: #000; } .postTags { margin: 5px 10px 15px 10px; font-size: 9pt; color: #000; } p.comments { clear: both; padding: 5px 10px 5px 10px; } p.comments a { padding-left: 20px; background: url(images/comment.gif) left top no-repeat; font-size: 10pt; text-decoration: none; } .commentlist { margin: 10px 0; font-size: 10pt; list-style: none; } .commentlist li { margin: 0 0 10px -25px; background: #CBE7FA; border: 1px solid #9DCAE8; width: 530px; } .commentlist cite { padding: 10px; font-size: 10pt; } .commentlist cite a { } .commentmetadata { padding: 10px; } .comment h3 { padding: 0 10px; font-size: 12pt; font-weight: bold; text-decoration: none; color: #000; } .comment p { padding: 10px; font-size: 10pt; color: #000; } .comment a { text-decoration: none; } .comment a:hover { text-decoration: underline; } .comment textarea { width: 555px; } .comment #submit { width: 118px; height: 30px; background: url(images/commentbutton.gif) left top no-repeat; border: none; font-size: 9pt; color: #333; } .comment #submit:hover { cursor: pointer; } .aligncenter { display: block; margin-left: auto; margin-right: auto; } .alignleft { float: left; } .alignright { float: right; } /* Sidebars */ .sidebars { float:right; margin-top: 0px; margin-left: 15px; padding-top: 9px; width: 300px; } .sidebars h2 { padding: 6px 5px 2px 7px; font-size: 11pt; color: #fff; background: url(images/sidebar_title_bg.gif) left top no-repeat; height: 29px; } .sidebars table { width: 300px; } .sidebars ul { margin: 0; padding: 0 0 5px 0; } .sidebars li { margin-bottom: 20px; list-style: none; font-size: 9pt; } .sidebars li ul { padding: 0; } .sidebars ul ul li { margin: 0; padding: 3px 2px 2px 16px; color: #333; background: url(images/bullet.gif) left 7px no-repeat; line-height: 17px; /* Required for cross-browser consistency; cross-browser defaults vary. */ border-bottom: 1px dashed #ddd; } .sidebars li.nobg a:hover { background: none; color: #003366; text-decoration: none; } .sidebars a { display: inline; color: #333; text-decoration: none; } .sidebars a:hover { color: #003366; background: #C1DEF1; } .sidebars p { padding: 2px 0; font-size: 9pt; } #tag_cloud a { display: inline; } .sidebars ul.children li {border-bottom:none;} .sidebars ul.children {margin-bottom:-5px;} /* Footer */ #footer { clear: both; padding-top: 10px; color: #fff; text-align: left; /* IE Centering Technique */ } #footer p { padding: 0; font-size: 8pt; line-height: 19px; } #footer a { color: #A6DDEA; } #footer a:hover { color: #D0DE9C; } #credits { clear: both; float: left; margin: 0 auto; padding: 0 0 5px 0; width: 950px; text-align: center; } /* extras */ .cleared { clear: both; } .left { float:left; } .right { float:right; } #nextprevious { padding:10px; font-size:85%; } a.gravatar { float:right; margin:10px 15px 20px 0; width:50px; }
I really hope there is anyone out there who can help me.
Thanks //Thomas
- The topic ‘I have a big problem with Dynamic Sidebar…’ is closed to new replies.