Re: Centering an image with css



Carolyn Marenger <cajunk@xxxxxxxxxxxx> wrote:

>In HTML, I used <center><img src="whatever.gif></center> to horizontally
>center a graphic on a page. What is the CSS way of doing the same?

p{text-align:center}

<p><img src="image.png" alt="alt content here"></p>

--
Spartanicus
.



Relevant Pages

  • Re: cellspacing und cellpadding
    ... >the HTML-Attributes cellspacing and cellpadding? ... should not be moved to CSS. ... Spartanicus ... Prev by Date: ...
    (alt.html)
  • Re: IE Div hack
    ... >ignores CSS {display: none} ... Spartanicus ... Prev by Date: ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: display: none -> block -> table-row
    ... IE doesn't support the CSS table model. ... Spartanicus ... Prev by Date: ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Centering an image with css
    ... Spartanicus wrote: ... What is the CSS way of doing the same? ... Carolyn ... Prev by Date: ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: CSS layout frustration
    ... >> You are thoroughly confused about CSS conformance. ... Spartanicus previously posted, that if some perverse user decided to ... then maybe a user preference can say that the CSS ...
    (comp.infosystems.www.authoring.stylesheets)