Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border between two columns without height speified

Tags:

html

css

I've got two columns and i need to add line between them. This is 1px solid color so i would love to achieve this with css. The trick is that content is dynamicaly loaded, so sometimes the left column can have more text and sometimes right column can have more text. Of course if the size of coulmn would be always the same i would add the border to bigger one. But unfortunatly i don't.

So is there a way to achieve this or do i have combine it with php and maybe strlen or something?

You can find simple code for this problem here http://jsfiddle.net/M9TSs/

like image 999
Kokers Avatar asked Nov 24 '11 19:11

Kokers


1 Answers

One way of doing it would be to have a border on both, and use a negative 1px margin to pull the right column over so that the borders overlap:

http://jsfiddle.net/7GCff/

like image 161
brianreavis Avatar answered Nov 15 '22 10:11

brianreavis