View Full Version : Countdown coding....
03-22-2005, 08:44 PM
i know this may seem simple, but i got this code from this website. I want to have the colored background centered to the page. I cant figure out how to change it. Can anyone help? Following is the link for the code i got from this site. Thanks in advanced
03-23-2005, 04:26 AM
This is easy, just enclose the entire thing in a centered element. For example:
<div align="center">put the script and its ilayer here</div>
You could use <p align="center"></p> as well, or get even more creative and stick the thing somewhere inside a table. Just make sure that wherever you put it, you allow enough horizontal space for its width.
03-23-2005, 08:26 AM
<div align="center">put the script and its ilayer here</div>Just so you know, the preferred way to centre content is to set equal margins on the element:
margin: 0 auto;
<div class="centred">...</div>The align attribute and the center element are deprecated. The latter was never really very good at centring due to various interpretations of a rather vague specification. The align attribute is equally vague, which is why it too should be dropped.
See a recent discussion (http://groups.google.co.uk/groups?hl=en&lr=&safe=off&threadm=N0Y_d.408970%24PH1.308838%40amsnews05.chello.com) in Usenet.
03-23-2005, 03:08 PM
Thanks, like the questioner in the link you supply, I too have wondered what the applicable method would be as we blithely deprecate <center> and align="center". Seems it is a work in progress, interesting though.
Powered by vBulletin® Version 4.2.1 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.