Problem with Featured Content Gallery alignment.
-
So I installed the Featured Content Gallery plugin from wpelements.com, but its alignment is all off on my page. Perhaps it’s a conflict with my theme? I’ve checked through all the sources codes, css, and I can’t seem to find anything causing the alignment to be all off like it is. Even tried putting it on different pages and places within the site, same thing every time. No one else using this plugin seems to have the same issue.
Any ideas?
-
I had to take down the new site while I continue with the maintenance, but here are the sources:
index.php
<?php get_header(); ?> <?php if(!is_paged()) { ?> <div id="top" class="clearfloat"> <div id="headline"> <?php include (ABSPATH . '/wp-content/plugins/content-gallery/gallery.php'); ?> </div> <div id="featured"> <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/featured.png" width="72px" height="17px" alt="" /> <?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?> <?php while (have_posts()) : the_post(); ?> <div class="clearfloat"> <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a> <?php } ?> <div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> </div> </div> <div id="middle" class="clearfloat"> <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" /> <?php $display_categories = array(5,6,7,8,11); $i = 1; foreach ($display_categories as $category) { ?> <div id="cat-<?php echo $i; ?>" class="category"> <?php query_posts("showposts=1&cat=$category")?> <span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span> <a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a> </div> <?php $i++; ?> <?php } ?> </div> <?php } ?> <div id="bottom" class="clearfloat"> <div id="front-list"> <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-161,-130,-166&paged=$page&posts_per_page=5"); ?> <?php while (have_posts()) : the_post(); ?> <div class="clearfloat"> <h3 class=cat_title><?php the_category(', '); ?> »</h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> <div class="spoiler"> <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a> <?php } ?> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <div class="right"><?php next_posts_link('Next Page »') ?></div> <div class="left"><?php previous_posts_link('« Previous Page') ?></div> <?php } ?> </div> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>css.php
/* Theme Name: Arthemia Theme URI: http://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/ Description: <a href="http://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/">Arthemia</a> theme is combining a magazine and a weblog into one; it is not too magazine-ish nor too blog-ish. Designed for WordPress. Gravatar support included along with automatic thumbnail resizer. Version: 1.0 Author: Michael Jubel Hutagalung Author URI: http://michaelhutagalung.com/2008/05/arthemia-magazine-blog-wordpress-theme-released/ The CSS, XHTML and design is released under GPL: http://www.opensource.org/licenses/gpl-license.php */ /* HTML Elements */ * { margin:0; padding:0; } body { font: 100% Arial, Helvetica; background: #222; color: #333; } p { margin: 15px 0; } a:link, a:visited { color: #569bbc; text-decoration:none } a:hover, a:active { color: #569bbc; text-decoration:underline; } a img { border:0; } code { font: 1.0em 'Courier New', Courier, Fixed; background:#ececec; } acronym, abbr, span.caps { font-size: 0.9em; letter-spacing: .07em; cursor: help; } acronym, abbr { border-bottom: 1px dashed #999; } blockquote { padding: 10px 10px 0 10px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; background: #eee; font:1.0em Arial; line-height:1.5em; margin:10px 0px; } select { width: 130px; } /* Structure */ #head { width:960px; margin:0px auto; margin-top:15px; padding:0px; font-size:0.7em; } #page { width:940px; margin:0px auto; padding:10px; background:#ececec; font-size:0.7em; } .left, .alignleft { float:left; } .right, .alignright { float:right; } /* Navigation Bar*/ #navbar { margin:0 auto; margin-top:15px; padding:0px 10px; text-transform: uppercase; background:#000 url(images/navbar.png); } #page-bar { width:722px; } #page-bar ul { list-style: none; } #page-bar li { float:left; list-style:none; cursor: pointer; display:block; border-right:1px solid #333; } #page-bar li:hover { background: #569bbc; } #page-bar a, #page-bar a:visited { margin: 0px; padding:10px 16px; font-weight:bold; color:#FFF; display:block; } #page-bar a:hover { text-decoration:none; display:block; } #searchform { width:194px; float:right; text-align:right; padding-top:8px; margin-right:10px; } /* Dropdown Menus */ #page-bar li { float: left; margin: 0px; padding: 0px; } #page-bar li li { float: left; margin: 0px; padding: 0px; width: 122px; text-transform:none; } #page-bar li li a, #page-bar li li a:link, #page-bar li li a:visited { background: #2B2B2B; width: 122px; float: none; margin: 0px; padding: 5px 10px 5px 18px; border-top: 1px solid #C0C0C0; } #page-bar li li a:hover, #page-bar li li a:active { background: #666666; padding: 5px 10px 5px 18px; } #page-bar li ul { position: absolute; width: 10em; left: -999em; } #page-bar li:hover ul { left: auto; display: block; } #page-bar li:hover ul, #page-bar li.sfhover ul { left: auto; } /* Text*/ h1 { font:3.5em Arial; font-weight:bold; letter-spacing:-0.08em; } h2 { font:2.3em Georgia, "Times New Roman"; } h3 { font:1.3em Arial; margin-bottom:3px; color:#333; font-weight:bold; } h4 { font:1.0em Arial; } h3.cat_title, h3.cat_title a { color:#333; letter-spacing:-0.05em; font-size:0.85em; } h3#respond { margin-top:0px; padding-top:20px; } h3#comments { margin-top:32px; padding-left:0px; } h3.authors { margin-top:15px; } /* Index Page*/ #logo { width:350px; } #tagline { margin-top:5px; font-size:1em; color:#333; } #top { padding:0; } #headline { width:590px; float:left; background:#fff; padding:10px; font-size:1.05em; line-height:1.5em; margin:0; } #headline div.title { font-weight:bold; font:2.4em Georgia; letter-spacing:-0.05em; display:block; padding-bottom:5px; } #headline div.meta { display:block; margin-top:-5px; padding-bottom:2px; } #headline p { padding-bottom:15px; } #featured { width:300px; background:#fff; float:right; padding:10px 10px 9px 10px; } #featured .clearfloat { margin-top:7px; margin-bottom:8px; } #featured .info { margin-top:5px; padding-top:5px; float:right; width:180px; } #featured .title { font-weight:bold; } #headline a img, #featured a img { border:1px solid #ccc; margin-top:5px; margin-right:10px; padding:2px; } #middle { width: 920px; background:#fff; float:right; padding:10px; margin:10px 0; } .category { width:164px; float:left; border-top:8px solid #333; margin:0px; padding:5px 10px 10px 10px; background:#fff; } .category p { margin:0; } #cat-1, #cat-3, #cat-5 {border-top:8px solid #333333;} #cat-2, #cat-4 {border-top:8px solid #569bbc;} .category span.cat_title, #front-popular h3, #front-list .cat_title, #archive .cat_title { text-transform:; margin:0; font-weight:bold; font-size:1.5em; letter-spacing:-0.05em; } #front-popular h3 { color:#fff; } .category a { color:#333; display:block; background:none; } .category a:hover { background:none; color:#fff; text-decoration:none; } #cat-1:hover, #cat-3:hover, #cat-5:hover {background:#333333; color:#fff; } #cat-2:hover, #cat-4:hover {background:#569bbc; color:#fff; } #cat-1:hover a, #cat-3:hover a, #cat-5:hover a {background:#333333; color:#fff; } #cat-2:hover a, #cat-4:hover a {background:#569bbc; color:#fff; } #bottom { width: 940px; } #front-list { width:590px; background:#fff; padding:10px; font-size:1.05em; line-height:1.75em; float:left; } #archive { padding-top:15px; font-size:1.05em; line-height:1.75em; } #front-list blockquote { padding: 0px 10px 0 10px; } #front-list .title, #archive .title { font-weight:bold; font:2.0em Georgia; letter-spacing:-0.05em; } #front-list .clearfloat, #archive .clearfloat { padding-bottom:10px; border-bottom:1px dotted #ccc; margin-bottom:10px; } #front-list .spoiler, #archive .spoiler { display:block; margin-top:3px; } #front-list p, #archive p { margin:0px; padding:0px; } .author { font-size:0.8em; font-weight:bold; } .meta { font-size:0.8em; color:#333; } .meta a { color:#333; } #headline p, #featured p { margin:0; } /* Content Page*/ #content { width:590px; background:#fff; padding:10px; font-size:1.05em; line-height:1.75em; float:left; min-height:400px; } #content .breadcrumbs, #content .breadcrumbs a { font-weight:bold; color:#333; } #content h2.title { font:2.2em Georgia; font-weight:bold; letter-spacing:-0.05em; border-bottom:1px solid #ddd; border-top:3px solid #ddd; padding:5px 0px; } .post { font-size:1.05em; line-height:1.75em; } .post p { margin-top:0px; } .post .clearfloat { border-bottom:1px dotted #ccc; margin:10px 0px; } .post ul, .post ol, #front-list ul, #front-list ol { margin-bottom:15px; } .post ul li, #front-list ul li { list-style:square; margin-left:30px; } .post ol li, #front-list ol li { list-style:decimal; margin-left:30px; } .post ol li ul li, #front-list ol li ul li { list-style:square; margin-left:20px; } .post img, .post a img, #front-list img, #archive img { border:1px solid #ccc; margin:0 10px 5px 0; padding:2px; } .post .ads { margin-top:10px; } .entry { margin-top:20px; } #stats { margin-top:0px; padding:4px 0px; text-transform:uppercase; font:0.8em Arial; display:block; } #stats span { padding: 0px 20px 0px 0px; } #stats span a:hover { background:none; } #stats span a { color:#333; } #stats img, #nav img { border:0px; margin:0px; padding:0px; } #tools { width:590px; height:25px; font-size:0.95em; } #tools a:hover { background:none; } .navigation { padding:5px 0px; text-align:Center; } /* Sidebar*/ #sidebar { width:320px; float:right; margin:0px 0px 0px 0px; } #sidebar h3 { font:1.1em Arial; font-weight:bold; background:#333; color:#fff; margin:10px 0px 5px 0px; padding:3px 10px; } #sidebar-top, #sidebar-bottom { width:300px; float:right; padding:0px 10px 10px 10px; background:#fff; } #sidebar-bottom, #sidebar-middle { margin-top:10px; } #sidebar-middle { width:320px; float:right; } #sidebar-left { width:135px; padding:0px 10px 10px 10px; float:left; background:#fff; } #sidebar-right { width:135px; padding:0px 10px 10px 10px; float:right; background:#fff; } #sidebar li { list-style:none; border-bottom:1px dotted #ccc; display:block; padding:2px 0px 2px 13px; background:url(images/sub.png) no-repeat 0 0px; } #sidebar li ul li:last-child{ list-style:none; border-bottom:0px dotted #ccc; display:block; padding:2px 0px 0px 13px; background:url(images/sub.png) no-repeat 0 0px; } #sidebar-ads { width:300px; float:right; margin-bottom:10px; padding:10px; background:#fff; } /* Form Elements */ select { border:1px solid #333; width:100% } .field { padding: 2px; border:1px solid #333; background:#fff; font-size:1.0em; } #s { padding:1px; font-size:1.0em; width:150px; } #searchsubmit { padding-left:5px; } #commentform input { width: 140px; margin: 5px 5px 1px 0; } #commentform textarea { width: 99%; margin-top:5px; } /* Comments*/ .commentlist cite { font-style:normal; margin-bottom:4px; display:block; } .commentlist blockquote { background:#ededed; } .commentlist li { padding: 10px 0px 10px 0px; list-style:none; margin-bottom:3px; } .commentlist li li { background:none; border:none; list-style:square; margin:3px 0 3px 20px; padding:3px 0; } .commenttext { padding: 10px 10px 0px 10px; background:#f2f2f2; border-top:1px solid #ddd; border-bottom: 1px solid #ddd; width:495px; float:right } .commentlist cite strong { font-size:1.1em; } li.my_comment { background: #FFF; border:none; } li.my_comment cite strong { font-size: 1.3em; color:#313228; } #commentform small { background:#FFF; font-weight:bold; padding:0; } .commentmetadata { color:#4d4d4d; display: block; margin-top:3px; text-align:right; font-size:0.9em; } .commentmetadata a, .commentmetadata a:visited { color:#959382; } .commentlist small { background:#e9e9e9; } .avatar { border:1px solid #bbb; margin:0px 10px 0px 0px; float:left; padding:2px; width:55px; height:55px; } #comment { width:590px; background:#fff; } /* Footer*/ #front-popular { font-size:0.7em; color:#fff; width: 940px; background:#000 url(images/bottombar.png) bottom no-repeat; margin: 0 auto; padding:10px; } #recentpost, #mostcommented { width:280px; float:left; padding:10px; border:1px solid #fff; } #mostcommented { margin-left:17px; } #recent_comments { width:280px; float:right; padding:10px; border:1px solid #fff; } #recentpost a, #mostcommented a, #recent_comments a { color:#fff; } #recentpost ul, #mostcommented ul, #recent_comments ul { margin-top:5px; } #recentpost ul li, #mostcommented ul li, #recent_comments ul li { list-style:none; border-top:1px dotted #fff; padding:5px; display:block; } #recentpost ul li:hover, #mostcommented ul li:hover, #recent_comments ul li:hover { background:#569bbc; color:#fff; } #recentpost ul li:first-child, #mostcommented ul li:first-child, #recent_comments ul li:first-child { border-top:0px dotted #fff; } #footer { margin: 0 auto; width: 960px; font-size:0.6em; padding-top:10px; padding-bottom:10px; } /* Float Properties*/ .clearfloat:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } .clearfloat { display: inline-block; } /* Hides from IE-mac \*/ * html .clearfloat { height:1%; } *+html .clearfloat { height:1%; } .clearfloat { display:block; }The Featured Content Gallery script is:
`<?php include (ABSPATH . ‘/wp-content/plugins/content-gallery/gallery.php’); ?>’ and it can be found on line 9 of the index. When viewing the page, the gallery aligns itself to the center of the site overlapping the sidebar, rather than being nicely aligned to the left as it should. I could really use some help on this, it’s so frustrating.Bump, still unresolved.
If it’d help I can provide the source code and CSS of the gallery as well. It’s just so weird that it’s doing this, I can’t seem to find a reason why. Perhaps it’s just something minor that I’m not seeing?
No one knows?
Something else strange I’ve noticed is that I’ve got this:
<div id="headline"> <?php include (ABSPATH . '/wp-content/plugins/content-gallery/gallery.php'); ?> <b>Most Popular</b> | <b>Recent Reviews</b> - list content - list content - list content - list content </div>Logically, you’d think that since the Content Gallery plugin is aligning itself to the center that the “Most Popular | Recent Reviews” etc. below it would be in the center as well. But they’re not. They’re aligned to the left where they’re supposed to be, and the Content Gallery is parallel to it, flush. I really have no idea why this is happening. I switched to another theme, dropped in the plugin script, and it worked just fine. What is it about this theme (or perhaps headline css) that needs to be edited to stop causing this?
I’ll have the site live for the next few hours as I’m working on other sections. Please take a look at it.
Ahh, I see you are using the Arthemia theme. That is what mine is and I am having the same problem as well. Like you, I’ve tried numerous variations and placements, but, everytime, no luck. It just seems this plugin and theme does not like one another, yes?
I ask this, does anyone know how to adjust the theme so that it be compatible with the plugin?
Thanks for replying. I’ve messed with it some more and I am almost positive it’s a conflict between the theme and the plugin.
This issue still stands unresolved. Does anyone have any ideas on how to adjust either the plugin or the theme to work properly with the other?
I’ve contacted the developer of the Featured Content Gallery, but I am yet to hear back. I’m obviously not alone with this problem.
Ugh, this is driving me insane.
I managed to find another site that uses the same theme and plugin and they somehow have theirs working. I’ve gone all through their visible source numerous times and I cannot find anything different from mine that would be causing the plugin to work for them and not me.
At this point, I’m willing to drop some money just to get this fixed. It seems so minor but nothing corrects it.
It’s a matter of going into the gallery.php of the plugin and removing an additional div tag that pulls from the “featured” in the style sheet css. That extra div tag messes everything up.
Glad to have this resolved. Hopefully my frustration and endless tinkering helps someone out in the future.
I was having the same problem… Here was the error or problem…
The Arthemia theme uses the id featured <div id=”featured”> in the header and in the css as well.
Featured Content Gallery uses the same id in the first line of the gallery.php file. What I did is simply change the gallery.php from <div id=”featured”> to <div>
Now that it no longer tries to use the Arthemia css from the theme everything works.I hope this helps…
you can solve it to rename the <div id=”featured”> in gallery.php to <div id=”featured1″> and also change the name in the gallery css file, this is how i got my site working.
Thanks – after 4 hours of trying to fix this on my own -I found your solution. Thanks a million
Jon @ hardballcoach.com
The topic ‘Problem with Featured Content Gallery alignment.’ is closed to new replies.