Reply to Re: Centering

Your name:

Reply:


Posted by dorayme on 04/09/07 23:18

In article
<qYqSh.19769$PL.10150@newsread4.news.pas.earthlink.net>,
"BootNic" <bootnic@bounce.earthlink.net> wrote:

> > dorayme <doraymeRidThis@optusnet.com.au> wrote:
> > news: doraymeRidThis-4C559E.14561609042007@news-vip.optusnet.com.au
> > In article
> > <AEiSh.19700$PL.9488@newsread4.news.pas.earthlink.net>,
> > "BootNic" <bootnic@bounce.earthlink.net> wrote:
> >
> [snip]
> >>> http://tinyurl.com/2a434t
> [snip]
> >
> > OK, thanks, what about now that I have added:
> >
> > #wrapper {border: 1px solid #fff; padding:3px;}
> >
> > to the css? Can the border be simply border:0 or do "px" have to
> > be mentioned for these popular browsers?
>
> Just border-width:0; would do. Just to change the default that a
> browser may have set such as IE has, maybe others as well.
>

OK.

> Most browsers only use the part of the script to calculate the width to
> compare it to the float width, but if the border is not set then the
> script halts at the error and no centering takes place.
>
> In the my example III, I added a visual aid to see which centering
> method was being used, named pass and fail. The default text was set
> to black, the pass class color was set to blue, and the fail color was set
> to red. I use that so it would show up on browserShots for the browsers
> I did not have access to.
>
> if(w<=check+10){w=w+'px';wrap.className='pass'}
> else {w=check+'px';wrap.className='fail'}
>
> In the above snip of code it would be safe to remove the className
> part of the script.
>
> wrap.className='pass'
> wrap.className='fail'
>

OK

> The overflow part of the script was used to drag the #wrapper down
> to enclose all the floats, If you're not setting a different background color,
> background image or a visible border, they can remain omitted.

I can experiment later with this. I am not using a different
background for now, enough complications already! I will be well
pleased when everyone is having as little trouble as I am with
your js. It is working on all my browsers really well, also in
Win IE6 and also in IE 7 on a Vista machine.

I have even implemented this on a real thumbnail/enlargement set
of pages and ditto the success that I am seeing (no new
principles are involved to the demos in the urls here)

--
dorayme

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация