Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Centering the Contnents of a DIV?
Old 06-25-2007, 06:59 PM Centering the Contnents of a DIV?
Ultra Talker

Posts: 316
Trades: 0
I have a DIV with other DIVs in side it.

I would like to center the contents of the outside DIV so that the two DIVs inside it are centered (preferably without their contents being centered).

I used text-align: center; on my wrapper DIV which created the required effect in IE but not in FF.

I also set the background to blue so I could see it but that doesnt show up in FF either.

This is my DIV which I would like the DIVs inside to be centered:

Quote:
#other-wrapper {
height: 100%;
width: 100%;
align: center;
text-align: center;
background-color: #3300FF;
}
http://londonlabs.co.uk/test/dave/index.htm
http://londonlabs.co.uk/test/dave/styles.css

Thanks
Joe3000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-25-2007, 07:29 PM Re: Centering the Contnents of a DIV?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Sorry was this fixed?
im having the same problem with a site im doing http://dansgalaxy.co.uk/ipme looks (dare i say) perfectly lined up how i want but in FF all not right Lol.

If you fixed this please tell me how! if not someoe else help!

Thanks
Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 06-26-2007, 03:26 PM Re: Centering the Contnents of a DIV?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
The rule align: center is invalid.
Set the margins on the interior divs to margin: 0 auto; to center them inside #wrapper.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-26-2007, 03:35 PM Re: Centering the Contnents of a DIV?
Ultra Talker

Posts: 316
Trades: 0
Many thanks.
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 06-26-2007, 05:06 PM Re: Centering the Contnents of a DIV?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
what am i missing?...

http://dansgalaxy.co.uk/ipme still looks fine in IE7 and not right in FF...
What am i missing >< http://dansgalaxy.co.uk/ipme/style.css heres the CSS.


Thanks
Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 06-26-2007, 08:11 PM Re: Centering the Contnents of a DIV?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Validate your code, Dan, you have 2 critical code warnings - unclosed divs.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-27-2007, 07:14 AM Re: Centering the Contnents of a DIV?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
ok, why didnt i think!. (no comment needed)

Ill have to remember to do that at home.

Thank LNR

Dan
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to Centering the Contnents of a DIV?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.81834 seconds with 12 queries