[thelist] RE: auto-sized boxes, and a CSS rant -- SOLVED

Gary Bland Gary at star-chaser.com
Tue Jun 25 17:17:01 CDT 2002


Jonathan_A_McPherson at rl.gov wrote:
> Brilliant, Chris!
>
> Yes, there is, and after consulting with a bright co-worker, I was able to
> use it to get what I wanted.
>
> The final code, working well:
>
> <div style="text-align: center;">
>   <span style="width: 0%; white-space: nowrap;">
>     <div style="text-align: left;">
>       do this<br />
>       do that<br />
>       do otherstuff<br />
>     </div>
>   </span>
> </div>

I haven't been following your thread so I am not sure what you want to
do. If you want to center a division with left text then all you need to
do is. It is probably going to wrap in the mail.

    <div id="something1" style="margin-lef:50%; margin-right:
50%;text-align:left; white-space:nowrap;">
             do this<br />
              do that<br />
              do otherstuff<br />
          </div>

If you need to use two division for some reason like your example then do.

<div id="something1" style="margin-left:50%; margin-right:50%;">
          <div id="something" style="text-align:left;white-space:nowrap;">
             do this<br />
              do that<br />
              do otherstuff<br />
          </div>
       </div>


They both validate.

hth
Gary




More information about the thelist mailing list