[Web4lib] HTML question

Araby Y Greene araby at unr.edu
Wed Apr 19 11:59:36 EDT 2006


This displayed centered in IE6 and Firefox, with your doctype:

<img style="display: block; margin: 0 auto; width: 150px; height: 130px;" alt="Summer Reading Registration starts 5 June!" title="Summer Reading Registration starts 5 June!" src="dogcolor3.jpg">

-araby

__________________________
Araby Greene
Web Development Librarian
Getchell Library/322
University of Nevada, Reno
http://www.library.unr.edu/

araby at unr.edu
775.784.6500 x343

     /|
  \'o.O'
  =(___)=
    U
ACK! THPTPHH!


> -----Original Message-----
> From: web4lib-bounces at webjunction.org [mailto:web4lib-
> bounces at webjunction.org] On Behalf Of Lynne Puckett
> Sent: Wednesday, April 19, 2006 8:47 AM
> To: web4lib at webjunction.org
> Subject: Re: [Web4lib] HTML question
> 
> 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
> 
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/


More information about the Web4lib mailing list