Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I get these columns to be equal size?

Posted on 2011-09-17
2
Medium Priority
?
223 Views
Last Modified: 2012-05-12
I have a site here http://174.132.164.189/~artofste/index.php?option=com_juliaportfolio&layout=detail&catid=1%3Apaintings&Itemid=54 that displays a series of paintings in columns.

I cannot get the columns to stay the same width. If you change the number of items displayed by changing the bottom dropdown to "10" and then jump to page 4 you can see it only has 3 paintings and they are bunched together.

Any help would be appreciated.
@CHARSET "UTF-8";
.portfolio
{
	margin: 0px 5px;
}
.portfolioitem
{
	margin-top: 0px;
	margin-bottom: 10px;
	text-align: center;
}
.itemimage
{
	background: #fff;
	padding: 7px;
	border: 1px solid #ccc;
	margin: 5px 10px;
}
.itemdescription
{
	text-align: center;
	color: #ccc;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	padding: 3px 5px;
}
.itemlink
{
}

.icon-48-portfolio
{
    background-image: url('../images/icon-48-portfolio.png');
}

div.portfolioitem {margin-left: auto; margin-right: auto;  width: 170px;}

.portfolioitem.col-1 {
  margin-right: 5px;

}

.colset-1 .col-1 {
  width: 19.3%;

}

.col-1,.col-2,.col-3,.col-4 ,.col-5 {
 float: left; 
  border: 1px solid white;
}

/**/
.colset-2 .col-1,.colset-2 .col-2 {
  width: 19.3%;
}

.colset-2 .col-2 {
  float: right;
}

/**/ /**/
.colset-3 .col-1,.colset-3 .col-2,.colset-3 .col-3 {
  width: 19.3%;
}

.colset-3 .col-3 {
  float: right;
}

/**/ /**/ /**/
.colset-4 .col-1,.colset-4 .col-2,.colset-4 .col-3, .colset-4 .col-4 {
  width: 19.3%;
}

.colset-4 .col-4 {
  float: right;
}

/**/ /**/ /**/  /**/
.colset-5 .col-1,.colset-5 .col-2,.colset-5 .col-3, .colset-5 .col-4, .colset-5 .col-5 {
  width: 19.3%;
}

.colset-5 .col-5 {
  float: right;
}

Open in new window

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
2 Comments
 
LVL 10

Accepted Solution

by:
acbxyz earned 2000 total points
ID: 36555124
Line 36:
div.portfolioitem { width: 170px;}
will be overwritten with line 81 to 83
.colset-5 .col-1,.colset-5 .col-2,.colset-5 .col-3, .colset-5 .col-4, .colset-5 .col-5 { width: 19.3%; }

If you remove the .colset-5 .col-n (and increase the 170px a bit) you should get what you want.
Besides, the little gap of 5 pixels from 38-41 is only between the first and second column.
0
 

Author Closing Comment

by:Donnie Walker
ID: 36555164
thanks!!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Suggested Courses

661 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