I can turn a div into a circle like this:
.circle {
background-color: rgba(0, 0139, 0139, 0.5);
height: 200px;
width: 200px;
-moz-border-radius:50%;
-we
EDIT: I mistook your question. You'll need Javascript to assign the hight width to the highest value, as well as make sure your content is centered.
Here's how in this JSFiddle: http://jsfiddle.net/rgthree/K4Kpw/
This is a line
This is yet another line!
Last Line!
CSS:
.circle {
position:relative;
background-color: rgba(0, 0139, 0139, 0.5);
padding:10px;
-moz-border-radius:50%;
-webkit-border-radius: 50%;
border-radius:50%;
}
.circle > div{
position:absolute;
top:50%;
left:50%;
}
JQuery:
$('.circle > div').each(function(){
var h, w, max;
w = $(this).width();
h = $(this).height();
max = w > h ? w : h;
$(this).css('margin-left', -parseInt(w/2,10));
$(this).css('margin-top', -parseInt(h/2,10));
$(this).parent().width(max);
$(this).parent().height(max);
});