I have problems with positioning a div to the right. Right now i have a wrapper that is positioned relative with a width of 100% and height of 100%. In the wrapper i have my div positioned right but it doesnt go right, it stays absolute no matter what. Even tried with float:right; but doesnt work.
Awesome that worked :) Didnt know that. But how do i do it in the opposite direction ? Like left ? Thought i could do left: 0; but it turned right as well.
Never mind, i did position:fixed; on that div and it worked :)
Don't use align="right" — that doesn't do anything besides invalidate your page.
If you want to actually float something, use #rightdiv { float:right; } — or float:left; if you want to, well, float it to the left.
Floats aren't as easy as relative, absolute or fixed positioning, but it's still something well worth looking into. In addition to learning about floats the second most important thing is to know that every time you float something you have to use display:inline; for IE. Otherwise the padding (or was it the margins) will double.
Ok but i cant seem to get it to work. I have one div that i have to the right now which i did with the left:0; and the only way i can get the second div to the left is by specifying in pixels left:500px; but i need it to stay all the way to the left, even if the user resizes the window. Tried with floating also but the div stays and overlaps with the first div to the right.
But kari.patila is right about using floats instead of positioning elements like this. Try removing the 3 positioning properties altogether on both elements and apply floats instead (float:left, float:right etc.) and see what happens.
Thank you :) I see what i did wrong. I didnt close the divs properly, i closed the divs i had after tons of content which is wrong. Now it works on all browsers :) cool Except Opera which doesnt handle the styling of the forms evidently. I have labeled my form and control it in my CSS with label { display:block:width:100px;float:left;} guess Opera cant do that :(
Never mind, Opera couldnt handle <p> so i had to use < br/> in case anyone needs the solution ;)