[Web4lib] HTML question
Lynne Puckett
lpuckett at billings.lib.mt.us
Wed Apr 19 11:46:52 EDT 2006
Rick Mason wrote:
> Nope, it is not basic; don't feel dumb. Figuring that out was a bit of
> a headache for me when I first encountered it.
>
> The following, although based on CSS, passes the HTML 4.04 strict and
> transitional validation at http://validator.w3.org/ :
>
> <div style="text-align: center;">
> <img alt="alt text" src="imagefile.png">
> </div>
>
> Hope this helps!
>
> Rick
Dear Rick,
Thank you for the idea, but it's not quite right for my situation.
Check out http://www.billings.lib.mt.us/kids.html
The dog-image is supposed to be centered. I used style margins, but that
only works if a) I get the number of pixels correct and b) everybody who
looks at it has the same screen resolution I do. If I put the image in a
separate div, that messes up the text flow. The div it's already in has
to float left to fit the layout. I have been suffering from this
delusion that CSS was supposed to make layout easier, so why is a simple
image-centering so difficult?
I do appreciate your suggestion, but it's just like the old days of
centering a paragraph in order to center a table or image inside the
paragraph, and I thought that was supposed to go away.
Lynne
--
L. E. Puckett
Reference & Electronic Systems Librarian
Parmly Billings Library
510 North Broadway, Billings, MT 59101
http://www.billings.lib.mt.us
Ph: 406-657-8258
More information about the Web4lib
mailing list