i cant decide what is better, i used to use absoulte because i thought i have more control , but now i relize that when you change the size of the browser (manualy) my divs change there position. so i tried relative and from what i understand the relative means that the location is relative to the div that is written before in the html.
my problem is i am not sure that what i am saying is correct because in one case i have a few divs that i want to switch between them by using visibilty hidden and visible. so they are located one under the other in the html :
Code:
<div id="Discription1" >
<img src="images/prestentation1.jpg" /><br />
some text<br /><a href="#" onclick="window.open('powerOfTen.html','window_name','scrollbars=no,width=820,height=600');">לצפייה</a> </div>
<div id="Discription2" >
<img src="images/prestentation2.jpg" /><br /><a href="#" onclick="window.open('hamachpela.html','window_name','scrollbars=no,width=780,height=480');"> xome text</a> </div>
i am using the id="Discription1" in order to call them from javascript and also to add style
Code:
#Discription1{
position:relative;
margin-right:184px;
margin-top:-215px;
}
so the relative is to the div before? so my margin-top should change from div to div right? i cant figure out how this works in this case....
i hope you had the patience to read this very very long question..
and help me not make it a monolog..
|