Click to See Complete Forum and Search --> : CSS: Displaying legend as Block Level element
legend {
display:block;
}
^ doesn't work. Any ideas?
I need my legends to act like headings.
obesebee
08-04-2008, 10:25 PM
This may or may not help as I'm so new to the web game, but does it have a width or a float set? I recall reading something about it needing that, but I may be mis-remembering.
Just a suggestion to get the ball rolling!
hewligan
08-05-2008, 09:52 AM
I saw this one early, and it looked like an easy one.
Um, yeah.
So I had a fiddle around. Then I did some google searches. Which turned up people with the same problem, but no good solutions.
The best solution I saw was to wrap the legend in a span, and then apply the display: block; to the span. Which is probably not the answer you were looking for. :(
I worked my way around the problem by using the background color of the form. I basically, wanted my legends to have a background color that spanned the width of the form element.
Anyone know a way to center the text inside a legend tag? Assuming its a inline element I'm almost certain its not possible without a wrapper.