I might have a solution for your problem. This solution is for a div with a border with 4 colors. It involves using :before and :after.
CSS
.test { /* this is our div with multiple borders */
position: relative;
width: [some width];
background: [some color, image, ...];
min-height: 4px;
}
Now, as you might have seen, we've set the position to relative. The thing is, this div is going to serve as a parent for another div that will stick to the bottom of it's parent:
.stickToBottom {
position: absolute;
bottom: 0;
top: 100%;
}
"Why did we make this div?", you might wonder. Well, as said before, we are going to work with :before and :after in order to get a border with 4 colors. It would be impossible to do it without this div.
.test:after, .test:before, .stickToBottom:before, .stickToBottom:after {
content: "";
float: right;
height: 4px;
}
.stickToBottom:before, [dir="ltr"] .stickToBottom:after {
float: left;
border-left: 35px solid black;
border-width: 125px;
border-right: 34px solid green;
border-width: 125px;
}
.test:after, [dir="rtl"] .test:before {
border-left: 35px solid yellow;
border-width: 125px;
border-right: 34px solid purple;
border-width: 125px;
}
And here is why: if we didn't include the stickToBottom div, and we were to say this:
.test:before, [dir="ltr"] .test:after {
float: left;
border-left: 35px solid black;
border-width: 125px;
border-right: 34px solid green;
border-width: 125px;
}
.test:after, [dir="rtl"] .test:before {
border-left: 35px solid yellow;
border-width: 125px;
border-right: 34px solid purple;
border-width: 125px;
}
the black and green borders would be located at the top of the div, while the yellow and the purple borders would be located at the bottom of the div, and there would be no way to fix this. By adding the stickToBottom div, we can achieve what you want: all borders will be located at the bottom.
HTML
<div class="test">
<p>test</p>
<div class="bottom"></div>
</div><!-- /test -->