Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Easy Date   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 03-25-2008, 09:00 PM   #1 (permalink)
Junior Member
 
Join Date: 03-25-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

mat4020 is liked by many
CSS Menu centering

Hello, Just joined the forum and would like to ask for some help. I am fairly new at CSS and am having a few problems with a site I'm creating.

I am working on this site: http://education.matthewbroughton.com/
and, as you probably notice, my CSS menu is all messed up. It aligns to the left side, and I can't figure out how to have it stay in the center.

Here are links to my two CSS documents:
http://education.matthewbroughton.com/default.css
http://education.matthewbroughton.com/dropmenu.css

I'm sure I have other problems in the code, and any corrections or recommendations are more than welcome.

Thanks in advance for helping a beginner out!

Matt
mat4020 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-25-2008, 10:03 PM   #2 (permalink)
Junior Member
 
Join Date: 03-16-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

ev8321 is liked by many
check carefully where your end </div> tags start and finish.

Move the </div> tag underneath <div id="content"> down to the bottom.

Should center after this. Let me know how you go.
ev8321 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-25-2008, 10:08 PM   #3 (permalink)
Junior Member
 
Join Date: 03-16-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

ev8321 is liked by many
your code overall i think looks okay, just need a bit of tweeking.
make sure you use a title tag at the top of the page.

Be sure to run the page through The W3C Markup Validation Service once you have completed and check your pages for functionality in the main browsers.

Not sure that your drop down menu will work across the board.

Goodluck!!
ev8321 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 01:31 AM   #4 (permalink)
v7n Mentor
 
Join Date: 09-03-07
Location: England
Posts: 528
iTrader: 0 / 0%
Latest Blog:
None

Boogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really nice
I haven't looked at your code but whatever <div> is wrapping the menu, simply giv it this property- it's worked across the board for me for ages now and validates.

Code:
#wrapperDiv { margin: 0 auto; }
That will center that wrapping Div.

HTH's

Boog's
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 05:25 AM   #5 (permalink)
Junior Member
 
Join Date: 03-25-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

mat4020 is liked by many
Thanks for the tips guys, but so far no luck yet. It could be that I'm doing something totally wrong - so tell me if I am.

Below is my div that is wrapping the menu
Code:
#content { float: left; width: 750px; margin: 0 auto; padding: 0 0; }
This is the xml for the menu
HTML Code:
<div id="content"> <div id="nav"> <ul id="pmenu"> <li class="tc"><a href="#nogo">Home</a></li> <li class="tc drop"><a href="#">Programs<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="#nogo" class="enclose">Teaching</a></li> <li class="fly"><a href="#nogo">Sports Management<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="#nogo" class="enclose">Compact</a></li> <li><a href="#nogo">Digital<!--[if IE 7]><!--></a><!--<![endif]--> <li><a href="#nogo">SLR</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> <li class="fly"><a href="#nogo">Cameras<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="#nogo" class="enclose">Compact</a></li> <li><a href="#nogo">Digital<!--[if IE 7]><!--></a><!--<![endif]--> <li><a href="#nogo">SLR</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> <li><a href="#nogo">Flash</a></li> <li><a href="#nogo">Video</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> <li class="tc"><a href="#nogo">Faculty</a></li> <li class="tc"><a href="#nogo">Students</a></li> <li class="tc"><a href="#nogo">News</a></li> </ul> </div> </div>
Again, any help is appreciated.
mat4020 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 05:26 AM   #6 (permalink)
v7n Mentor
 
Join Date: 09-03-07
Location: England
Posts: 528
iTrader: 0 / 0%
Latest Blog:
None

Boogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really niceBoogle is just really nice
Erase the line

Code:
float:left;
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.
Boogle is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 05:36 AM   #7 (permalink)
Junior Member
 
Join Date: 03-25-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

mat4020 is liked by many
Quote:
Originally Posted by Boogle View Post
Erase the line

Code:
float:left;
Wow, I feel stupid now!
Thanks Boogle!

I'm sure Ill have more questions soon, and I now know where to come.

Thanks again,

Matt
mat4020 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 05:36 PM   #8 (permalink)
Junior Member
 
Join Date: 03-25-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

mat4020 is liked by many
Ok, another problem.

I'm trying to use an image as a footer, but it is not filling the space it should be horizontally. (I know that makes little sense - please just visit the site here and see for yourself)

The footer div:
Code:
#footer { width: 750px; height: 75px; position: absolute; bottom: 0; left: 0; margin: 0 auto 0 0; background-image:url(images/img03.gif); background-repeat: no-repeat; background-attachment: fixed; background-position:bottom center; }
and the xml:
HTML Code:
<div id="footer"> <p>Copyright</p> </div>

please note that my body is using a background image that is repeated vertically. The css for that:

Code:
body { width: 750px; height: 100%; background: #669933 url(images/img01.png); background-attachment:fixed; background-repeat: repeat-y; background-position:center; margin: 0 auto; font-family: Verdana; color: #ffffff; }
Any help would be appreciated.

Matt
mat4020 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-26-2008, 05:38 PM   #9 (permalink)
Junior Member
 
Join Date: 03-25-08
Posts: 5
iTrader: 0 / 0%
Latest Blog:
None

mat4020 is liked by many
A screen shot of the problem. (see bottom right of the page)


Also, absolute position isn't quite what I want, but I don't know what to use instead.
Attached Thumbnails
css-menu-centering-problem1.jpg  

Last edited by mat4020 : 03-26-2008 at 05:43 PM.
mat4020 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick quesiton - Help with centering Tania Coding Forum 7 03-10-2008 10:36 AM
Centering Horizontal CSS Menu thecoolkid Coding Forum 13 08-30-2007 09:59 PM
eNom Reseller PDQ - Centering Problem ssgupta Coding Forum 5 06-24-2007 05:40 AM
Centering works in Firefox but not IE ? Spydey Coding Forum 1 04-17-2006 07:00 AM
DHTML Menu slide menu how to make it relative to table ajay201975 Web Design Lobby 0 05-25-2004 09:54 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:43 PM.
© Copyright 2008 V7 Inc