This is a discussion on "centering help please" within the Web Page Design section. This forum, and the thread "centering help please are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
centering help please
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
centering help please
Hey All,
I have a problem, I am attempt to design my first tabless layout which seems to be giving me all sorts of problems, I am currently atteptimg to place the part where it has "Destination", "Destination", "Destination", etc at the bottom of the layout: http://www.cheep-flights.com/ With this I want it to be in the center of the layout but everytime I change the float attribute to center it completely ruins the layout. Here is my HTML code
Thanks Wayne Last edited by Lchad; Aug 2nd, 2007 at 11:06. Reason: added code tags for easier viewing |
|
|
|
#2
|
|||
|
|||
|
Re: centering help please
Quote:
"Float: center" is invalid CSS that will never work. To centre a <div>, or other block-level element, use the CSS "margin: 0 auto;" |
|
#3
|
|||
|
|||
|
Re: centering help please
Hey Mike,
In which part of my css do I add "margin: 0 auto;"? Thanks Wayne |
|
#4
|
|||
|
|||
|
Re: centering help please
Quote:
You can replace the "0" with another number if you want top and bottom margins. Or you can expand the shorthand:
|
|
#5
|
|||
|
|||
|
Re: centering help please
Thanks I shall try this now
Wayne |
|
#6
|
|||
|
|||
|
Re: centering help please
One more thing: it won't work in IE if you trigger quirks mode.
To avoid triggering quirks mode, use a correct Doctype. Note that this will never work in IE5 (IE5 is always in quirks mode, as it were). There is a workaround, however. |
|
#7
|
|||
|
|||
|
Re: centering help please
Thanks mate
|
|
#8
|
|||
|
|||
|
Re: centering help please
Hmmm .... I posted that answer in the FAQ of the Webforumz Newsletter
|
![]() |
| Tags |
| centering help please |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vertical centering - please help! | mpnuttall | Web Page Design | 6 | Apr 16th, 2008 11:38 |
| Centering a Page In CSS | britishchampion | Web Page Design | 5 | Jan 3rd, 2008 16:20 |
| Centering website | afowler | Web Page Design | 8 | Oct 24th, 2007 18:59 |
| Centering a DIV | johnmr | Web Page Design | 12 | Sep 13th, 2006 13:07 |
| centering vertically | benbacardi | Web Page Design | 17 | May 27th, 2004 13:51 |