Hi Josh. It's hard to say without seeing your specific situation in
action, but here are a few thoughts:
1. wrap the two buttons in their own <div> tag. THis will cause them
to appear on their own line since <div> tags are display:block; by
default.
2. reduce the width of your container so there isn't enough space to
the right of the textarea for the buttons to appear there, forcing
them to wrap.
3. similar to #2, increase the width of your textarea to reduce empty
space on it's right side
4. similar to #3, specify a margin-right:XXpx on your textarea
instead of increasing its width (not sure if this will work in all
browsers, but it should)
Also, since you would just be inserting the <br /> tag via script,
nobody would ever really see it in the normal source code, so it's
probably not that big of a concern and there's nothing semantically
invalid about it. Although it is generally considered better to
remove presentational markup from your (X)HTML code.
Good luck!
-THEO-
On Apr 19, 2007, at 2:07 PM, Josh Nathanson wrote:
Hey all,
I'm working with jEditable which changes text to an input field
when you click the text. It works really nicely.
I modded it a bit to allow me to style each of the elements
individually, rather than the whole form, which is working fine.
When you generate a textarea, it also creates a "submit" and
"cancel" button - problem is that the submit button always appears
to the right of the textarea, with the cancel button below the
textarea on the next line.
I'd like to have both buttons appear below the textarea. I've
tried applying clear:both and float:none to the button style via a
class to make this happen, but neither has worked. Are there any
other tricks to getting the button to break to the next line below
the textarea via css? I don't want to append a <br> in the
jEditable code because that seems like a hack. Thanks for any help.
-- Josh