Trying to get DIVs to overlap correctly. Four quadrants with different, specific formatting and fifth overlaying those with the title graphic - html

Ok. So, I finally have my basic layout down. It's four quadrants, each with content pushed into the opposite corners. On top of all of this, I want to layout a DIV with the title image on it. The problem is to get the content of the lower quadrants to format correctly, I had to use relative/absolute positioning. This plays havoc with the overlapping DIV, which hides behind these lower quadrants. I've tried putting absolute and relative on the main DIV, moving it in and out of other DIV's and nothing I've tried so far has worked. Maybe I'm coming at this from the wrong angle, but that's where I'm at.
You can see how it looks here:
http://anniversary.cinemasight.com/
Here's the code. This is wordpress based, so some of it may look like gibberish.
This is also contained within a single Container DIV that's not included. Further, I have my CSS in the HTML temporarily. I will move it to my stylesheet as soon as I can get everything worked out. Since this is a "live" installation, the stylesheet was archiving on the web and preventing me from seeing changes as I made them, so this was the only alternative I could get to work.
<div id="Header Image" style="margin-left:-29px;margin-top:75px;"><img src="http://anniversary.cinemasight.com/wp-content/uploads/2017/05/Banner-Test-1.png" /></div>
<div id="Header_Container" style="margin-top:-325px;">
<?php
$cinemasight_header_query = new WP_Query( array(
'category_name' => 'academy-awards',
'posts_per_page' => 3
) );
if ($cinemasight_header_query->have_posts()) :
while($cinemasight_header_query->have_posts()) :
$cinemasight_header_query->the_post();
if( 0 == $cinemasight_header_query->current_post ) :
$thumbnail_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $thumbnail_id, $size = 'full' );?>
<div class="Header_Section_Left" style="background-image: url( '<?php echo $image_src[0]; ?>');background-clip: padding-box;background-repeat: no-repeat;background-size: cover;height: 200px;"><span class="Category_Header_Title" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;">ACADEMY AWARDS<br /></span><div class="Header_Upper_Left" >
<div class="Categories_Upper_Left">
<?php echo the_title(); ?>
</div>
<?php continue;
endif;?>
<span class="Categories_Upper_Left">
<?php the_title(); ?><br />
</span>
<?php endwhile;
endif;
wp_reset_postdata();?>
</div>
</div>
<?php
$cinemasight_header_query = new WP_Query( array(
'category_name' => 'reviews',
'posts_per_page' => 3
) );
if ($cinemasight_header_query->have_posts()) :
while($cinemasight_header_query->have_posts()) :
$cinemasight_header_query->the_post();
if( 0 == $cinemasight_header_query->current_post ) :
$thumbnail_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $thumbnail_id, $size = 'full' );?>
<div class="Header_Section_Right" style="background-image: url( '<?php echo $image_src[0]; ?>');background-clip: padding-box;background-repeat: no-repeat;background-size: cover;height: 200px;"><span class="Category_Header_Title" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;">REVIEWS<br /></span><div class="Header_Upper_Right">
<div class="Categories_Upper_Right">
<?php echo the_title(); ?>
</div>
<?php continue;
endif;?>
<span class="Categories_Upper_Right">
<?php the_title(); ?><br />
</span>
<?php endwhile;
endif;
wp_reset_postdata();?>
</div>
</div>
<div id="Header_Container">
<?php
$cinemasight_header_query = new WP_Query( array(
'category_name' => 'previews',
'posts_per_page' => 3,
) );
if ($cinemasight_header_query->have_posts()) :
while($cinemasight_header_query->have_posts()) :
$cinemasight_header_query->the_post();
if( 0 == $cinemasight_header_query->current_post ) :
$thumbnail_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $thumbnail_id, $size = 'full' );?>
<div class="Header_Section_Left" style="background-image: url( '<?php echo $image_src[0]; ?>');background-clip: padding-box;background-repeat: no-repeat;background-size: cover;height: 200px;position:relative;"><div class="Header_Section_Container" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;bottom:0;left:5px;position:absolute;"><span class="Category_Header_Title" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;">PREVIEWS</span><div class="Header_Lower_Left">
<div class="Categories_Lower_Left">
<?php echo the_title(); ?>
</div>
<?php continue;
endif;?>
<span class="Categories_Lower_Left">
<?php the_title(); ?><br />
</span>
<?php endwhile;
endif;
wp_reset_postdata();?>
</div></div></div>
<?php
$cinemasight_header_query = new WP_Query( array(
'category_name' => 'dvd-report',
'posts_per_page' => 3,
) );
if ($cinemasight_header_query->have_posts()) :
while($cinemasight_header_query->have_posts()) :
$cinemasight_header_query->the_post();
if( 0 == $cinemasight_header_query->current_post ) :
$thumbnail_id = get_post_thumbnail_id();
$image_src = wp_get_attachment_image_src( $thumbnail_id, $size = 'full' );?>
<div class="Header_Section_Right" style="background-image: url( '<?php echo $image_src[0]; ?>');background-clip: padding-box;background-repeat: no-repeat;background-size: cover;height: 200px;position:relative;"><div class="Header_Section_Container" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;position:absolute;bottom:0;right:3px;"><span class="Category_Header_Title" style="text-shadow: -1px -1px 3px #000000, 0 0 20px #0000FF, 0 0 5px #000080;">DVD REPORT</span><div class="Header_Lower_Right">
<div class="Categories_Lower_Right">
<?php echo the_title(); ?>
</div>
<?php continue;
endif;?>
<span class="Categories_Lower_Right">
<?php the_title(); ?><br />
</span>
<?php endwhile;
endif;
wp_reset_postdata();?>
</div>
</div>
</div>

You can give your title image a position: relative with a z-index: 1, That should put your title right up front.

Related

Start new table row every 3 cells

I am using ACF to fetch yacht listings (custom post types) which are then output in a table.
I could try and lay these out as Divs but this particular design means it is much easier as a table (there are borders in between and fluctuating heights which I would like to display of equal height).
The problem is, as these are populated dynamically, I am unable to lay the table out in html and thus, can't find a way to only have 3 cells wide per table row.
Is there a way to have a new row automatically start every 3 cells? Furthermore, is there a way to alter this based on screen width.
Currently the posts are not set in a table in the HTML but in the CSS, but I have tried both.
My code is:
<div class="the-latest-listings">
<div class="listings-table-row">
<?php
$args = array(
'post_type' => 'yachts',
'posts_per_page' => 9,
'orderby' => 'date',
'order' => 'DESC',
'meta_query' => array(
array(
'key' => 'sale_or_charter',
'value' => 'sale',
)
),
);
$my_posts = new WP_Query($args);
if ( $my_posts->have_posts() ) {
while ( $my_posts->have_posts() ) : $my_posts->the_post();
?>
<div class='latest-yacht-wrapper'>
<div class="single-latest-yacht-container">
<div class="latest-yacht-image">
<?php
$image = get_field( "preview_yacht_image", get_the_ID() );?>
<a href="<?php the_permalink(); ?>">
<img src="<?php echo esc_url($image['url']); ?>" title="<?php echo esc_attr($image['title']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" />
</a>
</div>
<div class="latest-yacht-blue-container">
<div class="sale-status-tab">
<p><?php echo the_field( "sale_or_charter", get_the_ID() );?></p>
</div>
<h4><?php the_title(); ?></h4>
<div class="teaser-details">
<?php if( get_field('price', get_the_ID() ) ){ ?>
<p class="latest-price">EUR <?php echo get_field( "price", get_the_ID() );?></p>
<p class="divider">|</p>
<?php }; ?>
</div>
</div>
</div>
</div>
<div class="yacht-spacer">
<div class="vertical-line"></div>
</div>
<?php
endwhile;
wp_reset_postdata();
}
?>
</div>
</div>
And the CSS that is think is relevant to the question
#page .the-latest-listings {
border-top: 1.3px solid rgba(28,34,64,.3);
border-bottom: 1.3px solid rgba(28,34,64,.3);
margin-top: 60px;
display: table;
width: 100%;
table-layout: fixed;
}
.listings-table-row {
display: table-row;
}
.latest-yacht-wrapper {
display: table-cell;
}
.single-latest-yacht-container {
padding: 78px 0;
}
.yacht-spacer {
width: 50px;
display: table-cell;
position: relative;
}
I tried setting the .latest-yacht-wrapper to 33% width but it doesn't work. I also tried these:
while($('.the-latest-listings ').find('tr:last').children(':gt(2)').length > 0){
$('.the-latest-listings ').find('tr:last').after(
$('.the-latest-listings ').find('tr:last').children(':gt(2)')
.wrapAll('<tr></tr>').parent().remove()
);
}
AND
while($('.the-latest-listings').find('tr:last').children(':gt(2)').length > 0){
var newRow = '';
$('.the-latest-listings').find('tr:last').children(':gt(2)').each(function(i,e){
newRow += $(e).prop('outerHTML');
}).remove();
$('.the-latest-listings').find('tr:last').after('<tr>' + newRow + '</tr>');
}
I also tried switching to a table layout in the html like so:
<table class="the-latest-listings">
<tr class="listings-table-row">
<?php
$args = array(
'post_type' => 'yachts',
'posts_per_page' => 9,
'orderby' => 'date',
'order' => 'DESC',
'meta_query' => array(
array(
'key' => 'sale_or_charter',
'value' => 'sale',
)
),
);
$my_posts = new WP_Query($args);
if ( $my_posts->have_posts() ) {
while ( $my_posts->have_posts() ) : $my_posts->the_post();
?>
<td class='latest-yacht-wrapper'>
<div class="single-latest-yacht-container">
<div class="latest-yacht-image">
<?php
$image = get_field( "preview_yacht_image", get_the_ID() );?>
<a href="<?php the_permalink(); ?>">
<img src="<?php echo esc_url($image['url']); ?>" title="<?php echo esc_attr($image['title']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" />
</a>
</div>
<div class="latest-yacht-blue-container">
<div class="sale-status-tab">
<p><?php echo the_field( "sale_or_charter", get_the_ID() );?></p>
</div>
<h4><?php the_title(); ?></h4>
<div class="teaser-details">
<?php if( get_field('price', get_the_ID() ) ){ ?>
<p class="latest-price">EUR <?php echo get_field( "price", get_the_ID() );?></p>
<p class="divider">|</p>
<?php }; ?>
</div>
</div>
</div>
</td>
<td class="yacht-spacer">
<div class="vertical-line"></div>
</td>
<?php
endwhile;
wp_reset_postdata();
}
?>
</tr>
</table>
And then this:
var $td = $(".listings-table-row td");
$td.each(function(i){
if (i % 3 == 0) {
$td.slice(i, i+3).wrapAll('<tr/>')
}
}).parent('tr').unwrap();
But again, no luck.
As I am writing this, I realise accounting for the spacers will mean it's not 3 TD's across but I can't get any to work regardless of what numbers I enter.
One of the following techniques could fit the bill:
https://youtu.be/qm0IfG1GyZU?t=711
https://youtu.be/qm0IfG1GyZU?t=184
RAM (Repeat, Auto, Minmax)
.ex7 .parent {
display: grid;
grid-gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
<div class="parent white">
<div class="box pink">1</div>
<div class="box purple">2</div>
<div class="box blue">3</div>
<div class="box green">4</div>
</div>
The Deconstructed Pancake
.ex2 .parent {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.ex2 .box {
flex: 1 1 150px;
/* Stretching: */
flex: 0 1 150px;
/* No stretching: */
margin: 5px;
}
<div class="parent white">
<div class="box green">1</div>
<div class="box green">2</div>
<div class="box green">3</div>
</div>
(source https://1linelayouts.glitch.me/)

Moving element over image?

The title of my featured article is positioned via css, but the results are not showing up properly in every screen.
I tried to place "mvp-feat2-main-text" element before "mvp-feat2-main left relative".
Problem: Text is shown behind the image. I need the text to show on top of the image.
Here is the relevant code:
<section id="mvp-feat2-wrap" class="left relative">
<?php global $do_not_duplicate; global $post; $recent = new WP_Query(array( 'tag' => get_option('mvp_feat_posts_tags'), 'posts_per_page' => '1' )); while($recent->have_posts()) : $recent->the_post(); $do_not_duplicate[] = $post->ID; ?>
<div class="mvp-feat2-main left relative">
<a href="<?php the_permalink(); ?>" rel="bookmark">
<div class="mvp-feat2-main-img left relative">
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
<?php the_post_thumbnail('mvp-post-thumb', array( 'class' => 'mvp-reg-img' )); ?>
<?php the_post_thumbnail('mvp-mid-thumb', array( 'class' => 'mvp-mob-img' )); ?>
<?php } ?>
<?php if ( has_post_format( 'video' )) { ?>
<div class="mvp-feat-vid-but">
<i class="fa fa-play fa-3"></i>
</div><!--mvpfeat-vid-but-->
<?php } else if ( has_post_format( 'gallery' )) { ?>
<div class="mvp-feat-gal-but">
<i class="fa fa-camera fa-3"></i>
</div><!--mvpfeat-gal-but-->
<?php } ?>
</div><!--mvp-feat2-main-img-->
<div class="mvp-feat2-main-text">
<h3 class="mvp-feat2-main-cat left"><span class="mvp-feat2-main-cat left"><?php $category = get_the_category(); echo esc_html( $category[0]->cat_name ); ?></span></h3>
<div class="mvp-feat2-main-title left relative">
<?php if(get_post_meta($post->ID, "mvp_featured_headline", true)): ?>
<h2><?php echo esc_html(get_post_meta($post->ID, "mvp_featured_headline", true)); ?></h2>
<?php else: ?>
<h2 class="mvp-stand-title"><?php the_title(); ?></h2>
<?php endif; ?>
</div><!--mvp-feat2-main-title-->
<div class="mvp-feat1-info">
<span class="mvp-blog-author"><?php esc_html_e( 'By', 'click-mag' ); ?> <?php the_author(); ?></span><span class="mvp-blog-date"><i class="fa fa-clock-o"></i><span class="mvp-blog-time"><?php the_time(get_option('date_format')); ?></span></span>
</div><!--mvp-feat1-info-->
</div><!--mvp-feat2-main-text-->
</a>
</div><!--mvp-feat2-main-->
Try to use
style="z-index:value">
on your html at then end where you want to have your element appear ontop of the image
Example:
<div class="mvp-feat2-main-text" style="z-index:99;">
the z-index value must larger then the z-index of the image so try to increase that value until it appears ontop.

Starting content container over bottom section of image

So I want to show my content showing over my image, but only slightly. So in a sense the image would look like it was partly the background of the page. I do not want my content box to stretch over the full width of the page like the image currently does however.
This is the page I am working on; http://outside.hobhob.uk/test/?portfolio=mind-the-gap-2
This is what I am aiming to have it look similar to (focusing just on how the content text box is slightly over the image): https://s32.postimg.org/ytavty67p/13340631_10154339496581336_223276410_o.jpg
Is there a way I can achieve this with maybe changing the css of the content box slightly? Maybe changing the position or z-index?
The code of the page is currently working in a typical way, I am also using Visual Composer to lay out the content in the page, so this may help me achieve this in a easier way?
<div class="pagewidth">
<div class="content single single-portfolio">
<div class="post-content">
<article id="post-<?php the_ID(); ?>" <?php post_class("post post-content-full"); ?>>
<div class="portfolio-attachment">
<?php
$pi_data = get_port_item_content(get_the_ID());
$n = 0;
the_post_thumbnail();
if ($pi_data) {
foreach ($pi_data as $content_info) {
switch ($content_info->type) {
case "image":
?>
<div class="item image"><img
src="<?php echo $content_info->url?>"/></div>
<?php
break;
case "youtube":
//check to see if the video has any options, the ? sign
$has = strstr($content_info->url, "?");
if (!$has) {
$embed = explode('"', $content_info->url);
// insert enablejsapi option
$embed[5] .= "?wmode=transparent";
$embed = implode('"', $embed);
} else {
// insert enablejsapi option
$embed = str_ireplace("&", "&", $content_info->url);
$embed = str_ireplace("?", "?wmode=transparent&", $embed);
}
// get original dimensions
$pattern = "/height=\"[0-9]*\"/";
preg_match($pattern, $embed, $matches);
$origHeight = preg_replace("/[^0-9]/", '', $matches[0]);
// compute new height
//$newHeight = $origHeight + 25;
$newHeight = $origHeight;
// adjust embed code
$pattern = "/height=\"[0-9]*\"/";
$embed = preg_replace($pattern, "height='" . $newHeight . "'", $embed);
// insert an id for the iframe
$id = '<iframe id="ytplayer' . $n . '" ';
$embed = str_ireplace("<iframe ", $id, $embed);
?>
<div class="item youtube fitvid"><?php echo $embed?></div>
<?php
break;
case "vimeo":
$embed = $content_info->url;
?>
<div class="item vimeo fitvid"><?php echo $embed?></div>
<?php
break;
}
//end switch
$n++;
} //end for each
}//end if
?>
</div>
</div></div></div>
<div class="pagewidth-single">
<div class="content single single-portfolio">
<div class="post-content">
<header class="content-headarea">
<div class="content-headarea-title">
<h1 class="post-title"><?php the_title(); ?></h1>
<ul class="portfolio-meta">
<?php $client = get_post_meta(get_the_ID(), 'client', true); ?>
<?php if (!empty($client)) : ?>
<li class="client">
<span class="portfolio-meta-heading"><?php _e('Client: ', 'framework'); ?></span>
<span><?php echo $client ?></span>
</li>
<?php endif; ?>
<?php $date = get_post_meta(get_the_ID(), 'date', true); ?>
<?php if (!empty($date)) : ?>
<li class="date">
<span class="portfolio-meta-heading"><?php _e('Date: ', 'framework'); ?></span>
<span><?php echo $date ?> </span>
</li>
<?php endif; ?>
<?php $lproj = get_post_meta(get_the_ID(), 'url', true);
if (!empty($lproj)) :
?>
<li class="launch">
<span class="portfolio-meta-heading"><?php _e('url', 'framework'); ?></span>
<a href="<?php echo get_post_meta(get_the_ID(), 'url', true); ?>"
class="superlink"
title="<?php echo get_post_meta(get_the_ID(), 'url', true); ?>">
<?php echo get_post_meta(get_the_ID(), 'url', true); ?>
</a>
</li>
<?php endif; ?>
</ul>
</div>
</header>
<div class="blog-post">
<div class="full-post">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php else:?>
<?php endif; ?>
</div>
</div>
<?php get_template_part( '/includes/share'); ?>
<?php comments_template(); ?>
<nav id="post-nav">
<div class="post-nav-inner">
<div class="nav-previous"><?php next_post_link( '%link', __( 'Next Post →', 'framework' ) ); ?></div>
<div class="nav-next"><?php previous_post_link( '%link', __( '← Previous Post', 'framework' ) ); ?></div>
<div class="clearfix"></div>
</div>
</nav>
</article>
</div>
</div>
</div>
So I am looking to start the overlay on the <header> section, from the page title onwards, while keeping the featured image as the full width background'ish half section. I want to avoid having the image basically cover the screen and so you can begin to see the content starting without needing to scroll down.
Is there a way I can achieve this with maybe changing the css of the
content box slightly? Maybe changing the position or z-index?
Yes, you can change the position pretty easily with position: relative and top: {n}px. Try adding this CSS:
div.pagewidth-single div.post-content {
position: relative;
top: -150px;
}

Joomla 3.x: Limit a module's size

I am new to Joomla and rather unexperienced with html/css. I have a module that adds a menu to my website. The menu is displayed correctly, but it seems that the position I use dedicates much more width to the position than I fill.
How do I resize a position or the size of a module that takes the position? I can't see any settings that would allow me to alter the width.
I assume I have to hack around in the css files then, right? How do I find the css responsible for the expansion in width of the module? I looked naively for 'position-8', but that would have been to easy.
I appreciate any pointer.
The screenshot shows my menu located in position-8 and the size of the position (the grey area). Next to it starts the article-content area. I want to fix this whole, but I am unsure of how to do that.
Firebug shows me this html-values for the grey-area
<div id="sidebar" class="span3" style="overflow: visible; z-index: 1;">
<div class="sidebar-nav" style="overflow: visible; z-index: 1;">
<div class="moduletable sidebar.swmenu" style="overflow: visible; z-index: 1;">
<h3>LTL Menu</h3>
<table id="outertable" class="outer" align="left" style="overflow: visible; z-index: 1;">
<tbody style="overflow: visible; z-index: 1;">
<tr style="overflow: visible; z-index: 1;">
<td style="overflow: visible; z-index: 1;">
<div id="outerwrap" style="overflow: visible; z-index: 1;">
</td>
</tr>
</tbody>
</table>
<hr style="display:block;clear:left;margin:-0.66em 0;visibility:hidden;">
<script type="text/javascript">
<script type="text/javascript">
</div>
</div>
The index.php of my template, I want to change the size of the position-8
<?php
/**
* #package Joomla.Site
* #subpackage Templates.protostar
*
* #copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* #license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Getting params from template
$params = JFactory::getApplication()->getTemplate(true)->params;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
// Detecting Active Variables
$option = $app->input->getCmd('option', '');
$view = $app->input->getCmd('view', '');
$layout = $app->input->getCmd('layout', '');
$task = $app->input->getCmd('task', '');
$itemid = $app->input->getCmd('Itemid', '');
$sitename = $app->getCfg('sitename');
if($task == "edit" || $layout == "form" )
{
$fullWidth = 1;
}
else
{
$fullWidth = 0;
}
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
$doc->addScript('templates/' .$this->template. '/js/template.js');
// Add Stylesheets
$doc->addStyleSheet('templates/'.$this->template.'/css/template.css');
// Load optional RTL Bootstrap CSS
JHtml::_('bootstrap.loadCss', false, $this->direction);
// Add current user information
$user = JFactory::getUser();
// Adjusting content width
if ($this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span6";
}
elseif ($this->countModules('position-7') && !$this->countModules('position-8'))
{
$span = "span9";
}
elseif (!$this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span9";
}
else
{
$span = "span12";
}
// Logo file or site title param
if ($this->params->get('logoFile'))
{
$logo = '<img src="'. JUri::root() . $this->params->get('logoFile') .'" alt="'. $sitename .'" />';
}
elseif ($this->params->get('sitetitle'))
{
$logo = '<span class="site-title" title="'. $sitename .'">'. htmlspecialchars($this->params->get('sitetitle')) .'</span>';
}
else
{
$logo = '<span class="site-title" title="'. $sitename .'">'. $sitename .'</span>';
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<jdoc:include type="head" />
<?php
// Use of Google Font
if ($this->params->get('googleFont'))
{
?>
<link href='//fonts.googleapis.com/css?family=<?php echo $this->params->get('googleFontName');?>' rel='stylesheet' type='text/css' />
<style type="text/css">
h1,h2,h3,h4,h5,h6,.site-title{
font-family: '<?php echo str_replace('+', ' ', $this->params->get('googleFontName'));?>', sans-serif;
}
</style>
<?php
}
?>
<?php
// Template color
if ($this->params->get('templateColor'))
{
?>
<style type="text/css">
body.site
{
border-top: 3px solid <?php echo $this->params->get('templateColor');?>;
background-color: <?php echo $this->params->get('templateBackgroundColor');?>
}
a
{
color: <?php echo $this->params->get('templateColor');?>;
}
.navbar-inner, .nav-list > .active > a, .nav-list > .active > a:hover, .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover, .nav-pills > .active > a, .nav-pills > .active > a:hover,
.btn-primary
{
background: <?php echo $this->params->get('templateColor');?>;
}
.navbar-inner
{
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 -1px 0 rgba(0, 0, 0, .1), inset 0 30px 10px rgba(0, 0, 0, .2);
}
</style>
<?php
}
?>
<!--[if lt IE 9]>
<script src="<?php echo $this->baseurl ?>/media/jui/js/html5.js"></script>
<![endif]-->
</head>
<body class="site <?php echo $option
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($params->get('fluidContainer') ? ' fluid' : '');
?>">
<!-- Body -->
<div class="body">
<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : '');?>">
<!-- Header -->
<header class="header" role="banner">
<div class="header-inner clearfix">
<a class="brand pull-left" href="<?php echo $this->baseurl; ?>">
<?php echo $logo;?> <?php if ($this->params->get('sitedescription')) { echo '<div class="site-description">'. htmlspecialchars($this->params->get('sitedescription')) .'</div>'; } ?>
</a>
<div class="header-search pull-right">
<jdoc:include type="modules" name="position-0" style="none" />
</div>
</div>
</header>
<?php if ($this->countModules('position-1')) : ?>
<nav class="navigation" role="navigation">
<jdoc:include type="modules" name="position-1" style="none" />
</nav>
<?php endif; ?>
<jdoc:include type="modules" name="banner" style="xhtml" />
<div class="row-fluid">
<?php if ($this->countModules('position-8')) : ?>
<!-- Begin Sidebar -->
<div id="sidebar" class="span3">
<div class="sidebar-nav">
<jdoc:include type="modules" name="position-8" style="xhtml" />
</div>
</div>
<!-- End Sidebar -->
<?php endif; ?>
<main id="content" role="main" class="<?php echo $span;?>">
<!-- Begin Content -->
<jdoc:include type="modules" name="position-3" style="xhtml" />
<jdoc:include type="message" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="position-2" style="none" />
<!-- End Content -->
</main>
<?php if ($this->countModules('position-7')) : ?>
<div id="aside" class="span3">
<!-- Begin Right Sidebar -->
<jdoc:include type="modules" name="position-7" style="well" />
<!-- End Right Sidebar -->
</div>
<?php endif; ?>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer" role="contentinfo">
<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : '');?>">
<hr />
<jdoc:include type="modules" name="footer" style="none" />
<p class="pull-right">
<a href="#top" id="back-top">
<?php echo JText::_('TPL_PROTOSTAR_BACKTOTOP'); ?>
</a>
</p>
<p>
© <?php echo date('Y'); ?> <?php echo $sitename; ?>
</p>
</div>
</footer>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>
If you check:
<?php if ($this->countModules('position-8')) : ?>
<!-- Begin Sidebar -->
<div id="sidebar" class="span3">
<div class="sidebar-nav">
<jdoc:include type="modules" name="position-8" style="xhtml" />
</div>
</div>
<!-- End Sidebar -->
<?php endif; ?>
position-8 is inside div #sidebar
You have to add a suffix to your module settings:
Advanced -> Module Class Suffix: mymenu
Then in your template css under: templates/your_template/css/template.css
You have to add: div#sidebar div.mymenu{ width: 100%; }
*change 100% with the number that will fit better
EDIT:
Your template is responsive based on bootstrap. You have to edit <div id="sidebar" class="span3"> span3 value to span2 or span1 and in your head section:
// Adjusting content width
if ($this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span6";
}
elseif ($this->countModules('position-7') && !$this->countModules('position-8'))
{
$span = "span9";
}
elseif (!$this->countModules('position-7') && $this->countModules('position-8'))
{
$span = "span9";
}
else
{
$span = "span12";
}
increase the span9 to span10 or span11 to fill the gap.

Issue with height for outside container/content images

Hi I'm modifying a Wordpress theme and I'm having some trouble positioning the outside container images that provide the border for the middle section of content. The problem is that the background images are not extending with the content, instead it stops at the bottom of the browser screen. The site is located here: http://www.richmindonline.com/test
I've never structured background images in this way before, so I apologize for my being naive to this issue.
Here's the CSS id's for the background image structure:
#main {border:1px solid blue; width:900px; display:block; margin:0px auto;}
#container {
width: 600px;
float:left;
border:0px solid red;
}
#content-before {
border:0px solid yellow;
content:"";
position:absolute;
display:block;
top:150px;
left:185px;
bottom:0px;
width:20px;
height:auto;
background:url('/test/wp-content/themes/basic/assets/images/main-boxed-light.png') 0px 0px repeat-y;
}
#content {
width:590px;
border:0px solid green;
}
#primary {
float:right;
overflow: hidden;
width: 250px;
border:1px solid brown;
}
#content-after {
border:0px solid yellow;
content:"";
float:left;
position:absolute;
display:block;
top:150px;
left:1145px;
bottom:0px;
width:20px;
height:auto;
background:url('/test/wp-content/themes/basic/assets/images/main-boxed-light.png') -20px 0px repeat-y;
}
#footer {
clear: both;
width: 100%;
}
Here is my index.php HTML div structure:
<?php get_header(); ?>
<div id="container">
<div id="content-before"></div><!-- #content-before-->
<div id="content">
<?php /* Top post navigation */ ?>
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'your-theme' )) ?></div>
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'your-theme' )) ?></div>
</div><!-- #nav-above --><?php } ?>
<?php /* The Loop — with comments! */ ?>
<?php while ( have_posts() ) : the_post() ?>
<?php /* Create a div with a unique ID thanks to the_ID() and semantic classes with post_class() */ ?>
<div id="post-<?php the_ID(); ?>"
<?php post_class(); ?>>
<?php /* an h2 title */ ?>
<h2 class="entry-title">
<?php the_title(); ?>
</h2>
<?php /* Microformatted, translatable post meta */ ?>
<div class="entry-meta">
<span class="meta-prep meta-prep-author"><?php _e('By ', 'your-theme'); ?></span>
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_link( false, $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'your-theme' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
<span class="meta-sep"> | </span>
<span class="meta-prep meta-prep-entry-date">
<?php _e('Published ', 'your-theme'); ?></span>
<span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span>
<?php edit_post_link( __( 'Edit', 'your-theme' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
</div><!-- .entry-meta -->
<?php /* The entry content */ ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">»</span>', 'your-theme' ) ); ?>
<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'your-theme' ) . '&after=</div>');?> </div><!-- .entry-content -->
<?php /* Microformatted category and tag links along with a comments link */ ?>
<div class="entry-utility">
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links">
<?php _e( 'Posted in ', 'your-theme' ); ?></span><?php echo get_the_category_list(', '); ?>
</span>
<span class="meta-sep"> | </span>
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'your-theme' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'your-theme' ), __( '1 Comment', 'your-theme' ), __( '% Comments', 'your-theme' ) ) ?></span>
<?php edit_post_link( __( 'Edit', 'your-theme' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
</div><!-- #entry-utility -->
</div><!-- #post-<?php the_ID(); ?> --> <?php /* Close up the post div and then end the loop with endwhile */ ?>
<?php endwhile; ?>
<?php /* Bottom post navigation */ ?>
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'your-theme' )) ?></div>
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'your-theme' )) ?></div>
</div><!-- #nav-below --><?php } ?>
</div><!-- #content -->
<div id="content-after"></div>
</div><!-- #container -->
<div id="primary" class="widget-area">
</div><!-- #primary .widget-area -->
<?php get_sidebar(); ?>
<div style="clear:both"></div>
<?php get_footer(); ?>
The min-height value of 100% that you are using to try to stretch the outer columns to the full length of the page isn't working because it returns the browser window height.
Perhaps posting the code for your template file so we can easily see your div structure would help in providing a resolution.