tags:

views:

83

answers:

3

I'm working on simple HTML/CSS site, using a horizontal floated CSS menu. The problem i have is i cant figure out how to alter the positioning of the menu. Its currently at the top, i know that the function top: x px or bottom: x px are used to move anything up and down from top or bottom, but when i use either the menu still stays at the top? Can floated menu's anywhere other than at the top, as this limits what i can do with my site?

+2  A: 

Try setting the "position" style to "relative" for your floated element.

an example:

.floatedElement
{
    float:left;
    position:relative;
    top:15px;
}
NickGPS
Worked a treat, cheers Nick!
Dipesh Parmar
+1  A: 

I don't know what your HTML and CSS look like, but if you have a wrapper around the menu you can position the wrapper anywhere on your page.

To help you with the how to do that, check out this great tutorial on CSS positioning...

fudgey
+1  A: 

Top, bottom, left, right all work with relative or absolute positioning.

If you aren't using these and have a floated container (eg: float:left;), as I tend to, then you can use margin or padding settings to position the element.

Jon Hadley
I did a few trials of this and found that if an element is floating you can add relative positioning to get left and top working. Keeps box model issues to a minimum too =)
NickGPS