Wordpress page of posts issue - php

I'm trying to make page of posts basing on the example from wordpress codex.
I am using a beautiful WP theme (Radcliffe) and have no success in combining it with mentioned example.
The page I've created works, indeed, but posts are overlapped, one on another. Below it there is a lot of white space and, in the end, the footer at the very bottom of this page.
My page looks like that for now:
<?php get_header(); ?>
<div class="content">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
wp_reset_postdata();
endwhile;
endif;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'category_name' => 'testy',
'paged' => $paged
);
$list_of_posts = new WP_Query( $args );
?>
<?php if ( $list_of_posts->have_posts() ) : ?>
<?php /* The loop */ ?>
<?php while ( $list_of_posts->have_posts() ) : $list_of_posts->the_post(); ?>
<?php // Display content of posts ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<div class="posts">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$total_post_count = wp_count_posts();
$published_post_count = $total_post_count->publish;
$total_pages = ceil( $published_post_count / $posts_per_page );
if ( "1" < $paged ) : ?>
<div class="page-title section small-padding">
<h4 class="section-inner"><?php printf( __('Page %s of %s', 'radcliffe'), $paged, $wp_query->max_num_pages ); ?></h4>
</div>
<div class="clear"></div>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php get_template_part( 'content', get_post_format() ); ?>
</div>
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="archive-nav">
<?php echo get_next_posts_link( '« ' . __('Older posts', 'radcliffe')); ?>
<?php echo get_previous_posts_link( __('Newer posts', 'radcliffe') . ' »'); ?>
<div class="clear"></div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>
could somebody please show me my mistake?

this the css for the page content, maybe someone could take a look?
I still think the problem is somewhere in php code, I haven't touch the css yet since I've installed this theme.
.post { position: relative; }
.posts .post.has-featured-image { min-height: 266px; }
/* featured media */
.featured-media {
position: relative;
display: block;
width: 100%;
max-height: 682px;
}
a.featured-media:hover { opacity: 0.75; }
.featured-media > img {
visibility: hidden;
display: block;
margin: 0 auto;
}
.media-caption-container {
position: absolute;
bottom: 5%;
right: 5%;
left: 5%;
text-align: center;
}
.media-caption {
display: inline-block;
padding: 9px 12px;
border-radius: 3px;
background: #444;
background: rgba(17,17,17,0.5);
font-size: 0.8em;
line-height: 120%;
font-weight: 400;
font-style: italic;
color: #fff;
}
.media-caption:hover { background-color: rgba(17,17,17,0.75); }
/* post header */
.post-header { display: block; }
a.post-header { position: static; }
a.featured-media + a.post-header { position: absolute; }
a.post-header {
background: #BFBFBF;
background: rgba(17,17,17,0.35);
bottom: 0;
left: 0;
right: 0;
color: #FFF;
padding-left: 10px;
padding-right: 10px;
}
a.post-header:hover {
background: #333;
background: rgba(17,17,17,0.75);
color: #FFF;
}
.post.no-featured-image a.post-header { position: static; }
.post.no-featured-image a.post-header:hover { background: #333; }
a.post-header:hover .post-title { color: #CA2017; }
.post-meta-top {
text-transform: uppercase;
color: #FFF;
font-size: 0.9em;
letter-spacing: 1px;
font-weight: bold;
text-align: center;
margin-bottom: 30px;
text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}
.post-meta-top .sep {
color: #CCC;
margin: 0px 5px;
font-weight: 400;
}
a.post-header .post-meta-top .sep {
color: #fff;
color: rgba(255,255,255,0.5);
text-shadow: none;
}
.sticky .post-meta-top { display: block; }
.post-title {
font-family: 'Abril Fatface', serif;
font-size: 3em;
text-transform: uppercase;
letter-spacing: 1px;
text-align: center;
}
a.post-header .post-title {
max-width: 90%;
margin-left: auto;
margin-right: auto;
text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

Related

Anybody see what needs fixing in the styling?

So I created a comments section for a WordPress theme I am developing and after a good half hour of trying to figure out what went wrong in the labeling of the styling, I am stumped So the problem is the article.post img styling is affecting the comment-meta img. One should not be affecting the other.
I am also providing what it looks like in Chrome developer tools Elements:
<img alt="" src="http://1.gravatar.com/avatar/4f9ce072cb3fdb377cbb1a083d5c7d1a?s=80&d=mm&r=g" srcset="http://1.gravatar.com/avatar/4f9ce072cb3fdb377cbb1a083d5c7d1a?s=160&d=mm&r=g 2x" class="avatar avatar-80 photo" height="80" width="80">
This is the style.css:
body {
padding-top: 20px;
font-size: 15px;
color: #7a7a7a;
line-height: 1.7em;
}
a {
color: #0faf97;
}
.btn-primary {
background: #0faf97;
color: #fff;
border-color: #fff;
}
.btn-primary:hover {
background: #fff;
color: #0faf97;
}
.container {
max-width: 1020px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
background: #0faf97;
}
.jumbotron {
text-align: center;
border-bottom: 1px solid #e5e5e5;
padding-top: 90px;
padding-bottom: 90px;
color: #fff;
}
footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}
.block {
border:#ccc solid 1px;
padding: 20px 20px 30px 20px;
text-align: center;
}
.block h2 {
color: #0faf97;
}
.fa {
color: #0faf97;
}
.fa-3 {
font-size: 4em !important;
}
.marketing {
margin: 40px 0;
}
.content-region-1 {
background: #0faf97;
color: #ffffff;
text-align: center;
}
.content-region-2 {
background: #f4f4f4;
color: #333333;
}
.content-region-3 {
background: #000000;
color: #ffffff;
}
.content-region-2 img {
width: 100%;
}
.content-region-3 h4 {
}
.content-region-1 h1, .content-region-2 h3 {
margin: 0;
padding: 0;
padding-bottom: 15px;
font-size: 40px;
}
.content-region-3 form input[type="text"], .content-region-3 form textarea {
width: 100%;
padding: 5px;
background: #333;
color: #fff;
margin-bottom: 10px;
border: 0;
}
.pt20{padding-top: 20px;}
.pb20{padding-bottom: 20px;}
.pt30{padding-top: 30px;}
.pb30{padding-bottom: 30px;}
.pt40{padding-top: 40px;}
.pb40{padding-bottom: 40px;}
.pt50{padding-top: 50px;}
.pb50{padding-bottom: 50px;}
.pt60{padding-top: 60px;}
.pb60{padding-bottom: 60px;}
.side-widget {
margin-bottom: 40px;
}
.side-widget h3 {
border-left: 5px #0faf97 solid;
padding-left: 10px;
margin-bottom: 15px;
}
.title-bar {
background: #0faf97;
color: #ffffff;
padding-bottom: 10px;
border-bottom: 6px #ddd solid;
margin-bottom: 20px;
}
article.post {
border-bottom: 1px #ccc solid;
overflow: auto;
padding-bottom: 30px;
margin-bottom: 40px;
}
article.post .meta {
border-top: #ccc solid 1px;
border-bottom: #ccc solid 1px;
overflow: auto;
list-style: none;
margin: 0;
padding: 5px 0;
}
article.post .meta li {
float: left;
margin-right: 20px;
}
article.post img {
width:100%;
height: auto;
margin-bottom:20px;
}
.panel-heading {
background: #0faf97 !important;
color: #fff !important
}
.sidebar-widget ul {
padding: 0 !important;
list-style: none;
}
.sidebar-widget li {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #fff;
border: 1px solid #ddd;
}
.comments {
border: 1px #ccc solid;
padding: 10px;
margin-bottom: 20px;
margin-top: 10px;
}
.comments h2, .comments h3 {
background: #0faf97;
color: #fff;
padding: 5px;
}
.comment-body {
border: #ccc 1px solid;
margin-bottom:10px;
.comment-meta {
background: #333;
color: #fff;
padding: 10px;
overflow: auto;
}
.comment-meta img {
float: left;
margin-right: 10px;
}
.comment-meta time {
margin-left: 12px;
}
.comment-reply-link {
background: #0faf97;
color: #fff;
display: inline-block;
padding: 10px 15px;
}
.comment-form input, .comment-form textarea {
width: 100%;
padding: 3px;
border: #ccc 1px solid;
margin-bottom: 20px;
}
This is the comments.php file:
<div class="comments">
<h2>Comments</h2>
<?php $args = array(
'walker' => null,
'max_depth' => '',
'style' => 'ul',
'callback' => null,
'end-callback' => null,
'type' => 'all',
'reply_text' => 'Reply',
'page' => '',
'per_page' => '',
'avatar_size' => 80,
'reverse_top_level' => null,
'reverse_children' => '',
'format' => 'html5', // or 'xhtml' if no 'HTML5' theme support
'short_ping' => false, // #since 3.6
'echo' => true // boolean, default is true
);
?>
<?php wp_list_comments($args, $comments); ?>
<?php
$form_args = array(
'label_submit' => 'Send',
'title_reply' => 'Write a Reply or Comment',
'comment_notes_after' => '',
'comment_field' => '<p class="comment-form-comment"><label for="comment">'._x('Comment','noun').'</label><br /><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
);
comment_form($form_args);
?>
</div>
When I alter the article.post img css it also affects the avatar image. I can't figure out how to alter that behavior. The avatar image is way too big and I just want to make it thumbnail size.
Here is the single.php file:
<?php get_header(); ?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<article class="post">
<section class="row title-bar">
<div class="container">
<div class="col-md-12">
<h1><?php the_title(); ?></h1>
</div>
</div>
</section>
<section class="row main">
<div class="container">
<?php if(is_active_sidebar('sidebar')) : ?>
<div class="col-md-8">
<?php else : ?>
<div class="col-md-12">
<?php endif; ?>
<article class="post">
<div class="post_thumbnail">
<?php if(has_post_thumbnail()): ?>
<?php the_post_thumbnail(); ?>
<?php endif; ?>
</div>
<ul class="meta">
<li>By <?php the_author(); ?></li>
<li><?php the_time('F j, Y g:i a'); ?></li>
<li>
<?php
$categories = get_the_category();
$separator = ", ";
$output = '';
if($categories){
foreach($categories as $category){
$output .= ''.$category->cat_name .''.$separator;
//$output .= $category->cat_name . $separator;
}
}
echo trim($output, $separator);
?>
</li>
</ul>
<br>
<?php the_content(); ?>
</article>
<div class="clr"></div>
<?php endwhile; ?>
<?php endif; ?>
<?php comments_template(); ?>
</div>
<?php if(is_active_sidebar('sidebar')) : ?>
<div class="col-md-4">
<?php dynamic_sidebar('sidebar'); ?>
</div>
<?php endif; ?>
</div>
</section>
<?php if(is_active_sidebar('content-region-1')) : ?>
<?php dynamic_sidebar('content-region-1'); ?>
<?php endif; ?>
<?php if(is_active_sidebar('content-region-2')) : ?>
<?php dynamic_sidebar('content-region-2'); ?>
<?php endif; ?>
<?php get_footer(); ?>
When I alter article.post img it changes the avatar img in comment section, but it also alters the blog images. Not sure that ended up happening. In theory, if I had done this correctly, comment-meta img should be what alters the avatar image. Chrome developer tools outputs this as CSS:
element.style {
}
article.post img {
width: 100%;
height: auto;
margin-bottom: 20px;
}
.comment-meta img {
float: left;
margin-right: 10px;
}
img {
vertical-align: middle;
}
img {
border: 0;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
img[Attributes Style] {
height: 80px;
width: 80px;
}
Inherited from footer.comment-meta
.comment-meta {
background: #333;
color: #fff;
padding: 10px;
overflow: auto;
}
footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
user agent stylesheet
li {
display: list-item;
text-align: -webkit-match-parent;
}
Inherited from body.post-template-default.single.single-post.postid-20.single-format-standard.logged-in.admin-bar.wp-custom-logo.customize-support
body {
padding-top: 20px;
font-size: 15px;
color: #7a7a7a;
line-height: 1.7em;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
}
Inherited from html
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
Pseudo ::before element
*:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Pseudo ::after element
*:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
The article.post img selector targets all images that are inside the article.post element. This includes your avatar images.
If you don't want to target the avatars, then make your selector more specific. Try this instead:
article.post .post_thumbnail img {
width: 100%;
height: auto;
margin-bottom: 20px;
}
Now, only images that are descendants of article.post and .post_thumbnail will get the styles.
revised fiddle

Wordpress: White space below footer

I got a problem with 2 out of 4 webpages on my WP site.
I got a whitespace below my footer. I've tried with position: fixed; and bottom: 0;.. But its not working.
Im kind of stuck right now.
PHP Code
<?php
/* Template Name: Contact_page */
get_header(); /* HÄMTA HEADER */
?>
<?php
$args = array( 'post_type' => 'employe', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
?>
<section class="contact_section">
<article>
<?php the_content(); ?>
<?php the_post_thumbnail();?>
</article>
</section>
<?php
endwhile;
?>
<?php
get_footer(); /* HÄMTA FOOTER */
?>
Here is the css code for the contact page
.contact_section{
margin: auto;
max-width: 60%;
margin-top: 40px;
}
.contact_section article {
margin-top: 20px;
width: 60%;
margin:auto;
}
.contact_section p {
float: left;
font-size: 1.8em;
}
.contact_section img{
margin-left: 20px;
}
CSS for footer
footer {
clear: both;
text-align: center;
bottom: 0;
background-color: #444444;
height: 200px;
padding-top: 30px;
padding-bottom: 10px;
}
You need to position the footer to absolute and give the body tag a padding of 200px at the bottom, like this:
body {
/* 200px for the footer and 30px for the padding body */
padding-bottom: 230px;
}
footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 200px;
}

Basic trouble with PHP - Line shift

I am working on a wordpress site and I am not very familiar with PHP.
Somehow I have managed to produce the following empty line below the image:
http://i.imgur.com/PazQgLl.jpg
So my question is how I can remove or avoid having this empty space below the image.
Here is the PHP for the page. The cause has to be in here somewhere, I think.
<?php
/**
* The template part for displaying the post meta information
*
* #package Editor
*/
?>
<div class="entry-meta">
<!-- Grab and display the featured image -->
<?php if ( '' != get_the_post_thumbnail()) {?>
<a class="frontfeatured-image" href="<?php the_permalink()?>">
<?php the_post_thumbnail('thumbnail-image')?>
</a>
<?php }?>
<!--
<ul class="meta-list">
<?php if ( has_category() ) { ?>
<li class="meta-cat"><?php the_category( ', ' ); ?></li>
<?php } ?>
<?php $posttags = get_the_tags(); if ( $posttags ) { ?>
<li class="meta-tag"><?php the_tags( '' ); ?></li>
<?php } ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<li class="meta-comment">
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'editor' ), __( '1 Comment', 'editor' ), __( '% Comments', 'editor' ) ); ?></span>
</li>
<?php endif; ?>
</ul>
-->
</div>
CSS:
.entry-meta {
display: inline-block;
width: 40%;
margin-right: 10px;
vertical-align: top;
border-width: 10px;
border-color: #000000;
border-style: solid;
}
#media (max-width: 768px) {
.entry-meta {
margin-bottom: 0%;
width: 100%;
}
}
.frontfeatured-image {
display: inherit;
border-style: solid;
border-color: #000000;
border-width: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
width: 100%;
-webkit-filter: grayscale(1);
filter: grayscale(1);
-moz-transition:-moz-transform 0.5s ease-in;
-webkit-transition:-webkit-transform 0.5s ease-in;
-o-transition:-o-transform 0.5s ease-in;
-moz-transition:-moz-transform 0.5s ease-out;
-webkit-transition:-webkit-transform 0.5s ease-out;
-o-transition:-o-transform 0.5s ease-out;
}
.frontfeatured-image:hover{
-moz-transform:scale(1.02);
-webkit-transform:scale(1.02);
-o-transform:scale(1.02);
color: #000000;
}
Try this
.frontfeatured-image img{
float: left;
}
What happens when you apply the following style on your image?
.frontfeatured-image img{
display: inline-block;
}

Centring logo on Wordpress template

I'm having a nightmare trying to center a logo in the header on a WP template. Can anyone please work out the following code and center the logo?
CSS
/**
* Header
* --------------------------------------------------------------------------- */
#header {
padding-top: 3em;
margin-bottom: 2.5em; }
#header #branding {
*zoom: 1;
max-width: 80%;
display: inline-block;
text-align: left; }
#header #branding:before, #header #branding:after {
content: " ";
display: table; }
#header #branding:after {
clear: both; }
#header #site-title {
display: inline-block;
margin: 0;
font-size: 2.25em;
text-align: left; }
#header #site-title a {
display: inline-block;
text-align: inherit; }
#header #site-title img {
display: block;
text-align: inherit;
margin: 0 auto;
vertical-align: baseline; }
#header.with-woocommerce #branding {
max-width: 100%;
display: block;
text-align: center;
margin-bottom: 2em; }
#header.with-woocommerce #site-title {
text-align: center; }
#header.with-woocommerce #site-title a {
display: block; }
PHP
<header id="header" class="<?php echo $hclass; ?>">
<hgroup id="branding">
<h1 id="site-title" role="logo">
<a href="<?php echo trailingslashit( esc_url( home_url() ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>">
<?php if ( get_theme_mod( 'bearded_logo' ) ) : ?>
<img src="<?php echo esc_url( get_theme_mod( 'bearded_logo' ) ); ?>" alt="<?php bloginfo( 'name' ); ?>" />
<?php else : bloginfo( 'name' ); endif; ?>
</a>
</h1>
<h2 id="site-description" class="hide-for-small"><?php bloginfo( 'description' ); ?></h2>
</hgroup><!-- #branding -->
<hgroup id="navigation" role="navigation" >
<?php do_atomic( 'before_nav' ); ?>
<?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template. ?>
<?php do_atomic( 'after_nav' ); ?>
</hgroup>
</header><!-- #header -->
Please help. Thank you - any advice would be much appreciated!
Add to CSS:
#site-title img {
margin-left: 45%;
}
Based off your more recent changes to the site you can add this to center the logo
#header #branding, #header.with-woocommerce #branding {
display: table;
margin: 0 auto;
}
If you go back to where the shop-nav is not full width I would make the header position relative and absolute position the shop-nav top right 0.
Give id="site-title" a margin-left: 43%

CSS background image not displaying (path of image is correct)

I am trying to add background image to div. For some reason I can't add picture. Can you guys tell me what I am doing wrong?
Here is code:
#featured {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-color: #ffffff;
background: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg');
background-repeat: no-repeat;
border: 1px solid #e5e5e5;
border-radius: 40px;
padding-bottom: 40px;
width: 99.893617021277%;
}
#featured p {
font-size: 18px;
font-weight: 200;
line-height: 27px;
padding: 0 40px 0 40px;
text-align: center;
}
#featured-image {
margin: 40px 0 0 0;
}
#featured-image .fluid-width-video-wrapper {
margin-left: -20px;
}
.featured-image img {
margin-top: 44px;
}
Here is HTML/PHP part. It's a custom wordpress theme and I will only show you exact part of website where this DIV is used.
<div id="featured" class="grid col-940">
<div class="grid col-460">
<h1 class="featured-title">
<?php
if ( isset( $responsive_options['home_headline'] ) && $db && $empty )
echo $responsive_options['home_headline'];
else
_e( 'Hello, World!', 'responsive' );
?>
</h1>
<h2 class="featured-subtitle">
<?php
if ( isset( $responsive_options['home_subheadline'] ) && $db && $empty )
echo $responsive_options['home_subheadline'];
else
_e( 'Your H2 subheadline here', 'responsive' );
?>
</h2>
<p>
<?php
if ( isset( $responsive_options['home_content_area'] ) && $db && $empty )
echo do_shortcode( $responsive_options['home_content_area'] );
else
_e( 'Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.','responsive' );
?>
</p>
<?php if ($responsive_options['cta_button'] == 0): ?>
<div class="call-to-action">
<a href="<?php echo $responsive_options['cta_url']; ?>" class="blue button">
<?php
if( isset( $responsive_options['cta_text'] ) && $db && $empty )
echo $responsive_options['cta_text'];
else
_e('Call to Action','responsive');
?>
</a>
</div><!-- end of .call-to-action -->
<?php endif; ?>
</div><!-- end of .col-460 -->
<div id="featured-image" class="grid col-460 fit">
<?php $featured_content = ( !empty( $responsive_options['featured_content'] ) ) ? $responsive_options['featured_content'] : '<img class="aligncenter" src="' . get_template_directory_uri() . '/core/images/featured-image.png" width="440" height="300" alt="" />'; ?>
<?php echo do_shortcode( $featured_content ); ?>
</div><!-- end of #featured-image -->
</div><!-- end of #featured -->
EDIT 2: Added HTML output:
http://pastebin.com/T78ZPQZK
change this
#featured {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-color: #ffffff;
background: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg');
background-repeat: no-repeat;
border: 1px solid #e5e5e5;
border-radius: 40px;
padding-bottom: 40px;
width: 99.893617021277%;
}
to this
#featured {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background: #fff url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg') no-repeat;
border: 1px solid #e5e5e5;
border-radius: 40px;
padding-bottom: 40px;
width: 99.893617021277%;
}
or to this
#featured {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-color: #ffffff;
background-image: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg');
background-repeat: no-repeat;
border: 1px solid #e5e5e5;
border-radius: 40px;
padding-bottom: 40px;
width: 99.893617021277%;
}
Give this a shot, with what you provided should work, just try adding a height value and background-size to the #featured div...also, somewhere along the lines in your html you have a php error...
HTML:
<div id="featured" class="grid col-940">
<div class="grid col-460">
<h1 class="featured-title">
<?php
if ( isset( $responsive_options['home_headline'] ) && $db && $empty )
echo $responsive_options['home_headline'];
else
_e( 'Hello, World!', 'responsive' );
?>
</h1>
<h2 class="featured-subtitle">
<?php
if ( isset( $responsive_options['home_subheadline'] ) && $db && $empty )
echo $responsive_options['home_subheadline'];
else
_e( 'Your H2 subheadline here', 'responsive' );
?>
</h2>
<p>
<?php
if ( isset( $responsive_options['home_content_area'] ) && $db && $empty )
echo do_shortcode( $responsive_options['home_content_area'] );
else
_e( 'Your title, subtitle and this very content is editable from Theme Option. Call to Action button and its destination link as well. Image on your right can be an image or even YouTube video if you like.','responsive' );
?>
</p>
<?php if ($responsive_options['cta_button'] == 0): ?>
<div class="call-to-action">
<a href="<?php echo $responsive_options['cta_url']; ?>" class="blue button">
<?php
if( isset( $responsive_options['cta_text'] ) && $db && $empty )
echo $responsive_options['cta_text'];
else
_e('Call to Action','responsive');
?>
</a>
</div><!-- end of .call-to-action -->
<?php endif; ?>
</div><!-- end of .col-460 -->
<div id="featured-image" class="grid col-460 fit">
<?php $featured_content = ( !empty( $responsive_options['featured_content'] ) ) ? $responsive_options['featured_content'] : '<img class="aligncenter" src="' . get_template_directory_uri() . '/core/images/featured-image.png" width="440" height="300" alt="" />'; ?>
<?php echo do_shortcode( $featured_content ); ?>
</div><!-- end of #featured-image -->
</div><!-- end of #featured -->
CSS:
#featured {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-color: #ffffff;
background: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg') no-repeat 0 0;
-moz-background-size: cover;
-webkit-background-size: cover;
background-size: cover;
border: 1px solid #e5e5e5;
border-radius: 40px;
padding-bottom: 40px;
width: 99.893617021277%;
height: 500px; /*-- Specify to your liking --*/
}
#featured p {
font-size: 18px;
font-weight: 200;
line-height: 27px;
padding: 0 40px 0 40px;
text-align: center;
}
#featured-image {
margin: 40px 0 0 0;
}
#featured-image .fluid-width-video-wrapper {
margin-left: -20px;
}
.featured-image img {
margin-top: 44px;
}
UPDATE / EDIT:
Better yet, take a look at this jsfiddle: http://jsfiddle.net/M63EG/1/
Updated code provided above!
Maybe, you need the !important key. So, in #featured CSS class, write this:
background: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg') !important;
in place of:
background: url('http://www.mobiexplore.com/temp1/wordpress/wp-content/uploads/2013/08/19377249_ml-1024x6651.jpg');

Categories