Solved

Why isn't my css for these columns working?

Posted on 2015-01-29
7
39 Views
Last Modified: 2015-02-04
I have a site here: http://www.lakeviewpantry.org/ that is suppose to have 4 columns where the brown area exists.

My development site: http://www.plumthree.com/lakeview/ works correctly...and I have copied the exact html and css code to the live site but it is not working.

This is my css:

.colmask{width:100%;left:0%;clear:both;float:left;overflow:hidden;position:relative;}

.colmid{right:20%;float:left;width:100%;position:relative;}
.colin{right:28%;float:left;width:100%;position:relative;}
.colleft{right:26%;float:left;width:100%;position:relative;}
.col1{width:24%;left:101%;padding:0px 0px 1em 0px;overflow:hidden;float:left;position:relative;}
.col2{width:24%;left:51%;padding:0px 0px 1em 0px;overflow:hidden;float:left;position:relative;}
.col3{width:26%;left:79%;padding:0px 0px 1em 0px;overflow:hidden;float:left;position:relative;}
.col4{width:18%;left:81%;padding:0px 0px 1em 0px;overflow:hidden;float:left;position:relative;}

Open in new window


and this is my php:

<div class="colmid">

        <div class="colin">

            <div class="colleft">

<div class="col1">
	<?php
	if ( dynamic_sidebar('home_right_2') ) :
	else :
	?>
	<?php endif; ?>             
</div>
<div class="col2">
	<?php
	if ( dynamic_sidebar('home_right_1') ) :
	else :
	?>
	<?php endif; ?>
</div>
<div class="col3">
	<?php
	if ( dynamic_sidebar('home_right_3') ) :
	else :
	?>
	<?php endif; ?>
</div>
<div class="col4">
	<?php
	if ( dynamic_sidebar('home_right_4') ) :
	else :
	?>
	<?php endif; ?>
</div>                
            </div>
        </div>
</div>

Open in new window


As always, any help is appreciated.
0
Comment
Question by:Donnie Walker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 

Author Comment

by:Donnie Walker
ID: 40579195
Since this is a live site I had to use a table for the four columns as a temp solution.

Still hoping for a css solution.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40579321
I would try to use display:table, display: table-row  and display:table-cell for this layout instead of floating, as "floating" is not the right way here.

apart from that, the "issue" you had is eventually coming from cached files?
0
 

Author Comment

by:Donnie Walker
ID: 40579776
Can you give me an example of what you mean?

I cleared the cache and disabled the Wordpress cache plugin they had used.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Donnie Walker
ID: 40580865
I'd settle for a 4 column responsive code example that worked.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 40581112
here we go with the css and the html as example:CSS
body { display: table; table-layout:fixed ; margin : 0; padding: 0;  height: 100%; width: 100%; position: relative;}
.row  { display: table-row ; width: 100%; background: blue; text-overflow: ellipsis ; text-align:center; }

.cell { display: table-cell;  width: 100%;
}

Open in new window

html body:
<body >
   <div class="row">
         <div class="cell">a</div>
         <div class="cell">b</div>
         <div class="cell">c</div>
  </div>
</body>

Open in new window

0
 

Author Comment

by:Donnie Walker
ID: 40582335
Well, I tested your code in a html file and it worked perfectly.

When I applied it to the header.php of the live site, instead of horizontal it went vertical like my old code.

So, to recap, it works fine on my development server and not on the live server. And the development server is a copy of the live server I made 6 days ago.

I am at a loss.
0
 

Author Closing Comment

by:Donnie Walker
ID: 40588800
Lakeview decided to go back to the stock three column solution and it worked for them.

But I liked your 3 column solution so I'm going to save that code for something else.

Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question