Center non-text content

liunx

Guest
Help a guy (me) who can't ever quite seem to get CSS straight:

I need to center the contents of a <div> element. The contents, however, are not text (it's a web control -- it's called eWebEditPro, if you're curious).

I can find all kinds of settings for padding-widths and border-widths. I also see a text-align attribute, but either
it doesn't work
it doesn't work on non-text (e.g., a web control) content
I'm using it wrong (<div id="ewebeditcontrol" style="display:none; border:0; text-align:center" >)

Is there a setting such as style="center-everything-inside"?

Thanks,
Jeff

PS Oops! Um, nevermind. It was the third choice -- I was using it wrong <sheepish-grin>.for last resort...try this simple
<div align="center"> </div>

Or you could always link to your site for easier overall look of your source<div style="margin:0 auto;text-align:center;><element with width></div>yet another. . .

{margin-left: auto;
margin-right: auto;}
 
Back
Top