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
CSS problem with centering
Old 11-02-2007, 07:40 PM CSS problem with centering
Nima's Avatar
Skilled Talker

Posts: 73
Trades: 0
I've been working on this top menu for a while.

It is the top menu on top of PokerEagles (not the one at very top with pictures but the drop menu one)...

I want to make the menus to be in the center of the page. It works fine in IE but it doesn't work in Firefox....

I do have the

Code:
margin: auto
Any idea why this is doing this?

Thanks
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
only $4.99 |
Please login or register to view this content. Registration is FREE


Free PR3 Deep Link Directories (
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
)

Last edited by Nima; 11-02-2007 at 07:41 PM..
Nima is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-02-2007, 08:28 PM Re: CSS problem with centering
Extreme Talker

Posts: 238
Location: United States
Trades: 0
To center something something using margin, the element you want to center must have a width less than 100%. Non-floated block elements, by default, have a width of 100%. On your #dropmenu, try:
Code:
margin: 0 auto;
width: 72em; /* you may have to change this width */
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 11-03-2007, 01:38 AM Re: CSS problem with centering
Novice Talker

Posts: 5
Trades: 0
You can use this example to set the margin
<html>
<head>
<title>this is the title of the web page</title>
<style type="text/css">
p.normal
{
border-style: solid;
}
p.margin
{
border-style: solid;
margin: 1cm 2cm 3cm 4cm;
}
</style>
</head>
<body>
<p class="normal">
This is a paragraph with no specified margins.
</p>
<p class="margin">
This is a paragraph has a top margin of 1cm, a right margin of 2cm, a bottom margin of 3cm and a left margin of 4cm.
</p>
<p class="normal">
This is a paragraph with no specified margins.
</p>
</body>
</html>
__________________

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

Please login or register to view this content. Registration is FREE
davidkendall is offline
Reply With Quote
View Public Profile
 
Old 11-03-2007, 02:47 AM Re: CSS problem with centering
Nima's Avatar
Skilled Talker

Posts: 73
Trades: 0
thank you guys, I will try these and post how it goes.

Thanks
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
only $4.99 |
Please login or register to view this content. Registration is FREE


Free PR3 Deep Link Directories (
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
)
Nima is offline
Reply With Quote
View Public Profile
 
Old 11-03-2007, 01:27 PM Re: CSS problem with centering
Nima's Avatar
Skilled Talker

Posts: 73
Trades: 0
hmm... i tried those and changed the width and played around with it, but no luck...
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
only $4.99 |
Please login or register to view this content. Registration is FREE


Free PR3 Deep Link Directories (
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
)
Nima is offline
Reply With Quote
View Public Profile
 
Old 11-03-2007, 05:58 PM Re: CSS problem with centering
Extreme Talker

Posts: 238
Location: United States
Trades: 0
Quote:
Originally Posted by Nima View Post
hmm... i tried those and changed the width and played around with it, but no luck...
It does work. You have an extraneous } in your CSS just before the #dropmenu, which is causing Firefox not to read it properly.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 11-03-2007, 06:48 PM Re: CSS problem with centering
Nima's Avatar
Skilled Talker

Posts: 73
Trades: 0
you're the man. thats all i can say. thanks
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
only $4.99 |
Please login or register to view this content. Registration is FREE


Free PR3 Deep Link Directories (
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
)
Nima is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS problem with centering
 

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 0.28201 seconds with 12 queries