Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS width: question Re: CSS width: question

#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.