Relative divs aligned right?

liunx

Guest
If I wanted to position a div relative to the left, I'd do something like..<br />
<br />
<DIV STYLE="position:relative; width:500; height:50; left:10px; top:50px; background-color:white; visibility: isible;">whatever</div><br />
<br />
I was wondering if there was a way of aligning the div a certain number of pixels from the right rather than from the left? :confused: <br />
<br />
cheers.. :)<!--content-->Couldn't you just do this ?... right: 10px }:-)<!--content-->Originally posted by Derek02 <br />
Couldn't you just do this ?... right: 10px }:-) <br />
I have done some Visual Basic programming... in VB, only 4 variables are used to determine a form's position and size: width, height, left, top...<br />
I DO NOT think there is "right" command, because... <br />
<br />
right = screen.width - left<br />
<br />
mjs, you can use the formula above to the effect you want, for example, if you use your <div> tag on a DHTML float menu, and if you know your menu is gonna to be 250 px wide and you want it to align 10 px from the right, then you would do 250 - 10 = 240, left: 240 px...<!--content-->
 
Back
Top