471,618 Members | 1,244 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,618 software developers and data experts.

Style Sheet Help

I am totally new, never done any CSS (ok a tiny bit) before, so please
bear with me....

I have been looking at the following:
http://www.brainjar.com/css/position...olutedemo.html

And am now wondering, how could I make DIV A1 appear 10px from the top
left hand corner of DIV A, whatever DIV A's position is set to?

I've been playing about a little but so far had no luck.
Sep 28 '07 #1
2 1567
On Fri, 28 Sep 2007 12:35:01 +0100, Mick Walker wrote:
[...]
I have been looking at the following:
http://www.brainjar.com/css/position...olutedemo.html

And am now wondering, how could I make DIV A1 appear 10px from the top
left hand corner of DIV A, whatever DIV A's position is set to?

I assume that by 'position' you mean the CSS property rather than the
on-screen position? Just set DIV A1's top and left to 10px rather than
150px and make sure that DIV A establishes a new containing block (for
example, by using position:relative). Information on containing blocks can
be found here:

http://www.w3.org/TR/CSS21/visudet.h...-block-details
--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/html/
Sep 28 '07 #2
Safalra wrote:
>
I assume that by 'position' you mean the CSS property rather than the
on-screen position? Just set DIV A1's top and left to 10px rather than
150px and make sure that DIV A establishes a new containing block (for
example, by using position:relative).
By using position:relative, fixed or absolute as in the OP's example.
Per 4. in the below given link.
Information on containing blocks can
be found here:

http://www.w3.org/TR/CSS21/visudet.h...-block-details
--
Gus
Sep 28 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Luke Bellamy | last post: by
2 posts views Thread by Herb Stull | last post: by
3 posts views Thread by Irfan Akram | last post: by
1 post views Thread by Amanda H. | last post: by
8 posts views Thread by pamelafluente | last post: by
10 posts views Thread by pamelafluente | last post: by
1 post views Thread by Looch | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.