You are here: Re: Centering « HTML « IT news, forums, messages
Re: Centering

Posted by BootNic on 04/09/07 13:11

> 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.

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'

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.

--
BootNic Monday, April 09, 2007 9:11 AM

All my humor is based upon destruction and despair. If the whole
world was tranquil, without disease and violence, I'd be standing on
the breadline right in back of J. Edgar Hoover.
*Lenny Bruce US comedian, satirist, author*

 

Navigation:

[Reply to this 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

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