Forum Moderators: not2easy

Message Too Old, No Replies

drop-down menu positioning within a CSS object

         

rsc1976

9:05 pm on May 4, 2005 (gmt 0)

10+ Year Member



I'm new to using CSS and I'm having a problem. Within my external style sheet I have defined a background, but all the content of my webpages is contained in a centered inside element (object1):
#object1 {
text-align: left;
position: relative;
margin: 15px auto 15px auto;
border: double 15px #ffff00;
width: 650px;
padding: 5px;
background-color: white;

I used a popular software system to create drop down menus for my pages.

The problem? When I insert the drop-down menu into object1, the alignment of the drop-downs is off. The drop down menu is aligning too far to the right and too far down. Because my top margin is 15 px, I was able to subtract 15 from a number in the code to correct the vertical alignment. The horizontal alignment is the problem. The distance between the left side of the screen and the left side of object1 is the same distance that the drop downs are going too far to the right. Because object1 is centered, I don't know how to fix this. Is there any way to define point (0,0) as the top left of object1 instead of the top left of the screen. If not, are there any other solutions?
TIA!

4css

1:05 pm on May 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi rsc1976
I'm not sure this will make a difference or not, but your shorthand for the border is incorrect. You have it like this:
border: double 15px #ffff00; 

It should be in this order:

border: 15px double #ffff00;

Try validating your page to see if any other errors come up, if you have not done so yet.

I'm sure that someone more experienced then I with css would be able to tell you if anything else is incorrect, or have anything to offer to help you.

4css