Home › Forums › CSS › CSS width: question › Re: CSS width: question
March 25, 2011 at 5:43 pm
#53608
soap
Participant
A div is a block-level element by default, meaning its width will be as wide as its containing element. If you want the width to be a certain number, I’m im afraid you will have declare it. The thing is, how would it know by itself how wide to be based on text inside of it. Now if you wanted random widths, that can done easily with javascript. Let know if me that is your goal.