Re: center <ol> in <div>




"David Dorward" <dorward@xxxxxxxxx> wrote in message
news:ebk8dj$7fo$1$8300dec7@xxxxxxxxxxxxxxxxxxx
Shank wrote:

In the below, how do I get the <ol> block to center in the <div>?
I've tried: <ol style="text-align:left; margin-left:auto;
margin-right:auto"> no luck!

That is centered, you just can't see it as it spans the entire width of
the
div as you haven't set a width on it.

http://dorward.me.uk/www/centre/

I want the <ol> to remain left aligned, but the whole block centered on
the page.

So shouldn't you be centring the div then?


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
----------------------------------
I was not aware the <ol> spanned the whole distance. My goof! How do I set
the width of the <div> where it will accommodate changing widths in the
<ol>? I don't want the <ol> to wrap text onto next lines. I guess what I
need is a collapse attribute for the <div>.
thanks


.



Relevant Pages

  • Full script fails
    ... over (ie top item - parent is MainDiv) ... // Sets tempcontainer to be the spans from the spans ... check that the div is the same as we're on ... // If subMenu title is closed which by default it is ...
    (comp.lang.javascript)
  • Re: IE, Firefox conflict.
    ... I haven't paid much attention to the code's progression, but it now looks quite the hacked up mess of superfluous divs, spans and class selectors. ... If I try to use use a different markup the markup does not like it, I get errors such as you can not use ul with div or something like that. ... It has to wrap when there isn't enough horizontal space for everything. ... If you want the text to stay clear of the image on the left side, you'll have to do something else, such as float the image left, but then you'll lose the vertical centering. ...
    (alt.html)
  • Re: IE, Firefox conflict.
    ... Using the div helps me keep it in sections that I can modify without affection other sections. ... The spans are there in order to change the appearance of the text that is connected to it. ... Your divs and class selectors are out of control. ... A 3MB jpg doesn't become a smaller download just because you told the HTML it was 180x135 instead of 1600x1200. ...
    (alt.html)
  • Justified formatting via CSS.
    ... their widths takes 100% of the browser, ... I create a DIV at 100% width. ... third spans to fill the remaining space. ...
    (alt.html)
  • Re: Regular Expression - Need a simple pattern!
    ... the following will capture your ... However, a div may contain nested elements, and if any of them is a div, it ... and it spans in multiple lines ...
    (microsoft.public.dotnet.general)