|
Posted by Benjamin Sattler on 07/21/07 20:12
Hi!
I guess you will have to make this span a block-level element. span
is an inline element. If you do then you should also specify a
width as otherwise the element streches across the whole screen
(the width of its parent container-element, respectively):
display:block;
width:100px;
Alternatively you may drop the "display" rule and just replace span
with a div element, which works the same way like span except it
already is a block level element.
bye
alice <alice@fearofdolls.com> wrote:
> Can someone tell me why, or for that matter how it's even
> possible, that text placed between this span with this class
> would not be centered?
>
> .heading {
> font: small-caps normal 18px Georgia, "Times New Roman",
> Times,
> serif;
> text-transform: uppercase;
> text-decoration: underline;
> padding: 8px;
> background: #232323;
> text-align: center;
> clear: both;
> margin-right: auto;
> margin-left: auto; }
>
> All the other attributes are working, like the font and
> background. What am I doing wrong? I've tried adding the inline
> style="text- align:center" and that will not do anything either.
> I've tried it without the left and right auto margins as well.
>
>
Navigation:
[Reply to this message]
|