PDA

View Full Version : Absolute positioning



niguangxingzou
Mar 19th, 2010, 05:02 AM
I'm not very sure how to write the selector for the following statement.
Can anyone help me with this

Absolute positioning to place the link nested within the div element with the id of num0 at the coordinates 200,60

I have a code as follows:

<div class="hello" id="num0">
<a "href="abc.htm"
<img src="../../images/abc.jpg" alt="" />
<p>
<span>ok.</span> How are you
</p>
</a>
</div>


any help on this is really appreciated.

bazz
Mar 19th, 2010, 05:41 AM
<div class="hello" id="num0">
<a "href="abc.htm">
<img src="../../images/abc.jpg" alt="" /></a>
<p>
<span>ok.</span> How are you
</p>
</a>
</div>


The coords should go into the CSS

zizther
Mar 20th, 2010, 04:30 AM
<div class="hello" id="num0">
<a "href="abc.htm">
<img src="../../images/abc.jpg" alt="" />
<p>
<span>ok.</span> How are you
</p>
</a>
</div>



The best way to handle absolute positioning is to make the tag the link is in have a positon of relative and the link tag have a absolute positioning


This allows you to control the the position of the link within a tag.
Note that you can go outside of the boundries of the outter / holding tag too.


Hope this helps slightly.

Apostropartheid
Mar 20th, 2010, 04:47 AM
zizther, I am not going so far to remove your comment but I suggest you amend it yourself. We have a policy of not downright answering homework questions, but giving pointers in order that the OP works it out himself.

zizther
Mar 20th, 2010, 01:39 PM
zizther, I am not going so far to remove your comment but I suggest you amend it yourself. We have a policy of not downright answering homework questions, but giving pointers in order that the OP works it out himself.

Apologies, I did not realise, i am new to the forum.

I will ammed the reply.