Hello. I am coding a website that is using a single CSS file that all pages reference. My problem is that each page is a drastically different length.

I have colored bars going down the sides, and there are lots of them. I have tried setting all the colored bars to 100%, and the main content div to 100% as well, but no matter what I do I can't seem to get the colored bars to go down the entire length of the page.

I know I could just have an internal css file for each page, but that would be too inconvenient. Of course, if there is no other way, ill have to do that. =D

So my question is: Is there a way to have my colored bars go the entire length of my content, even though the content on my pages is different lengths?

Thanks much!

How have you made the colored bars
Show code

div#trans2 { background: #080000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 0;
}
div#trans3 { background: #100000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: .9%;
}
div#trans4 { background: #180000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 1.8%;
}
div#trans5 { background: #200000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 2.6%;
}

div#trans6 { background: #280000;
width: .9%; 
height: 80ex;
position: absolute;
top: 0px;
left: 3.4%;
}
div#trans7 { background: #300000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 4.2%;
}
div#trans8 { background: #380000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 5%;
}
div#trans9 { background: #400000;
width: 1.1%;  
height: 80ex;
position: absolute;
top: 0px;
left: 5.9%;
}
div#trans10 { background: #480000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 6.8%;
}
div#trans11 { background: #500000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 7.7%;
}
div#trans12 { background: #580000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 8.6%;
}
div#trans13 { background: #600000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 9.5%;
}
div#trans14 { background: #680000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 10.4%;
}
div#trans15 { background: #700000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 11.3%;
}
div#trans16 { background: #780000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 12.2%;
}
div#trans17 { background: #800000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 13.1%;
}
div#trans18 { background: #880000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 14%;
}
div#trans19 { background: #900000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 14.9%;
}
div#trans20 { background: #980000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 15.8%;
}
div#trans21 { background: #A00000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 16.7%;
}







div#minitrans1 {background: #980000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 17.6%;
}
div#minitrans2 {background: #900000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 18.4%;
}
div#minitrans3 {background: #880000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 19.2%;
}
div#minitrans4 {background: #800000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 20%;
}
div#minitrans5 {background: #780000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 20.8%;
}
div#minitrans6 {background: #700000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 21.6%;
}
div#minitrans7 {background: #680000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 22.4%;
}
div#minitrans8 {background: #600000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 23.2%;
}
div#minitrans9 {background: #580000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 24%;
}
div#minitrans10 {background: #500000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 24.8%;
}
div#minitrans11 {background: #480000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 25.6%;
}
div#minitrans12 {background: #400000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 26.4%;
}
div#minitrans13 {background: #380000;
width: .9%;
height: 100px;
position: absolute;
top: 0;
left: 27.2%;
}
div#minitrans14 {background: #300000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 28%;
}
div#minitrans15 {background: #280000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 28.8%;
}
div#minitrans16 {background: #200000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 29.6%;
}
div#minitrans17{background: #180000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 30.4%;
}
div#minitrans18 {background: #100000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 31.2%;
}



div#hder {background: #080000;
width: 35.9%;
height: 100px;
position: absolute;
top: 0;
left: 31.9%;
}


div#rminitrans18 {background: #100000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 67%;
}
div#rminitrans17 {background: #180000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 67.8%;
}
div#rminitrans16 {background: #200000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 68.6%;
}
div#rminitrans15 {background: #280000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 69.4%;
}
div#rminitrans14 {background: #300000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 70.2%;
}
div#rminitrans13 {background: #380000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 70.9%;
}
div#rminitrans12 {background: #400000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 71.8%;
}
div#rminitrans11 {background: #480000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 72.6%;
}
div#rminitrans10 {background: #500000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 73.4%;
}
div#rminitrans9 {background: #580000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 74.2%;
}
div#rminitrans8 {background: #600000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 75%;
}
div#rminitrans7 {background: #680000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 75.8%;
}
div#rminitrans6 {background: #700000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 76.6%;
}
div#rminitrans5 {background: #780000;
width: 1%;
height: 100px;
position: absolute;
top: 0;
left: 77.4%;
}
div#rminitrans4 {background: #800000;
width: 1.1%;
height: 100px;
position: absolute;
top: 0;
left: 78.2%;
}
div#rminitrans3 {background: #880000;
width: 1.1%;
height: 100px;
position: absolute;
top: 0;
left: 79%;
}
div#rminitrans2 {background: #900000;
width: 1.1%;
height: 100px;
position: absolute;
top: 0;
left: 79.8%;
}
div#rminitrans1 {background: #980000;
width: 1.1%;
height: 100px;
position: absolute;
top: 0;
left: 80.6%;
}








div#rtrans21 { background: #A00000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 81.5%;
}
div#rtrans20 { background: #980000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 82.3%;
}
div#rtrans19 { background: #900000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 83.1%;
}
div#rtrans18 { background: #880000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 84%;
}
div#rtrans17 { background: #800000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 84.9%;
}
div#rtrans16 { background: #780000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 85.8%;
}
div#rtrans15 { background: #700000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 86.7%;
}
div#rtrans14 { background: #680000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 87.6%;
}
div#rtrans13 { background: #600000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 88.5%;
}
div#rtrans12 { background: #580000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 89.4%;
}
div#rtrans11 { background: #500000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 90.3%;
}
div#rtrans10 { background: #480000;
width: 1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 91.2%;
}
div#rtrans9 { background: #400000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 92.1%;
}
div#rtrans8 { background: #380000;
width: 1.1%; 
height: 80ex;
position: absolute;
top: 0px;
left: 93%;
}
div#rtrans7 { background: #300000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 93.9%;
}
div#rtrans6 { background: #280000;
width: 1.3%;  
height: 80ex;
position: absolute;
top: 0px;
left: 94.9%;
}
div#rtrans5 { background: #200000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 95.9%;
}
div#rtrans4 { background: #180000;
width: 1.2%; 
height: 80ex;
position: absolute;
top: 0px;
left: 96.8%;
}
div#rtrans3 { background: #080000;
width: 1.4%; 
height: 80ex;
position: absolute;
top: 0px;
left: 97.7%;
}
div#rtrans2 { background: #000000;
width: 1.4%; 
height: 80ex;
position: absolute;
top: 0px;
left: 98.7%;
}







































div#content { background: white;
width: 61.7%;
height: 100%;
position: absolute;
top: 100px;
left: 18.7%; 
font-family: Comic Sans MS;
font-size: 1.1em;
}


a:link {color: 1859B4; }

a:hover {color: E7AE00; text-decoration: none; }

a:visited {color: 800000; }

The "trans" are my colored bars. =D

Hi,

Could you post the HTML as well. Would like to see how you nested your divs.

And as for your Styles... Wow, sure there would be a WAY easier way to achieve what you trying to do.

Let em see how it looks, post the html and we will take it from there.

0px is an invalid style. Place units of measure on nonzero values that need them. Do not place units of measure on zero values. It causes some browsers to throw the entire style away.

commented: yes +18

Sounds a little like you are having a similar problem to me.

I had 3 columns in my page (div elements) of a specified width. The columns can have different amounts of text in them, so I didn't specify a height, I let that be fluid, but I needed all columns to extend to the same height as the longest column.

I posted a link to my solution here:

http://www.daniweb.com/forums/thread176880.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.