5933Re: [NH] Crediting a Photograph
- Mar 26, 2007Greg Chapman wrote:
> So, disregard the particular example for a moment and justYou can use text-align with IMG inside the DIV. To get what you want you
> answer, how one would use a <DIV> to align to a fixed width
> object that remains centered within the window.
may need to set the width of the text underneath the image or the DIV as
a whole manually, tables do it for you.
Alternatively centering DIVs is meant to be done by setting both
margin-left and margin-right to auto. As browser support varies you
ought to use all three, i.e. both margins plus text-align:center. A
downside is that this also centres text inside the DIV, so you may need
to use an extra inner content DIV and set its text-align to something
N.B: My source here is "integrated HTML and CSS" by Virginia deBolt -
- << Previous post in topic Next post in topic >>