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
Old 09-08-2006, 11:33 PM Centering a DIV
Novice Talker

Posts: 8
Trades: 0
I am building an interface where I have a DIV that gets made visible when you roll over a certain area. The div contains some nav elements, which are jscript rollovers themselves. I've got the code working to hide and show the DIV and to do the rollovers (I've only done the one in the upper left). Here is what it looks like so far:

Home

The problem is, I really want the design to be centered, and since I am using absolute positioning for the DIV, this creates a problem. Here is what it looks like when I center the underlying table:

Home

I'm pretty new to all his, and am stumped as to how to get that DIV element to center and align with the underlying table (since it is centered, I can't really predict exactly where it will be in the window).

I've seen articles saying this kind of thing can be one with CSS and have tried several of the samples I've seen with no luck. Anyone know of a good way to do this? Any help greatly appreciated.

Thanks

Johnmr

*
johnmr is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-08-2006, 11:39 PM Re: Centering a DIV
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
I can't see your problem, but I'm working on a similar site and I have the answer on it. Feel free to mod the code to your own specs.

It also uses relative and absolute positioning to put all the elements exactly where I wanted them to be, and it's rizzhonourably clean IMHO.

http://216.89.218.233/rosenlawsite

And for the love of God, get rid of Dr*amw*av*r. It's screwing up your code something awful.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-09-2006, 01:55 AM Re: Centering a DIV
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I see the problem. Seems it only happens with the upper-left quadrant, at least in Firefox.

Have you tried this method ?
Pure CSS Popups

That example is on a smaller scale, but the principle is the same.
__________________
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 09-09-2006, 03:23 PM Re: Centering a DIV
Novice Talker

Posts: 8
Trades: 0
Yes, I've only done the upper left one - the resxt are still just straight jscript rollovers. I did have a look at your link, but not quite sure how it applies here - I have the turning the DIV off and on covered, it is just the centering it to match the width of the underlying table I'm having trouble with. Any clues? Any hel appreciated.
johnmr is offline
Reply With Quote
View Public Profile
 
Old 09-09-2006, 03:33 PM Re: Centering a DIV
Novice Talker

Posts: 8
Trades: 0
thanks for the advice - your site look very much like what I'm trying to do. The one big difference is that in each "rollover" I need to have embedded links, not just one link to the whole area, which is why I'm showing and hiding a whole DIV to begin with. As you can see this all works fine (albeit with Dreamweaver's bulky code - you're are so right about that), but the real issue, as I see it, is that I can center that DIV when it is called by the rollover. Any ideas on getting that to work? Any help appreciated.
johnmr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Centering 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 0.21908 seconds with 12 queries