Link to home
Start Free TrialLog in
Avatar of RupertA
RupertAFlag for United Kingdom of Great Britain and Northern Ireland

asked on

simple layer question in php

hi a,

I got a question as regards echoing from php onto my html page. As you can see, the left position is 10 for all three divs. It regards 10 as 10 pixels to the right of the last div. I want it to be 10 pixels to the right of absolute position (0,0). Otherwise when I position stuff on my page I will eventually be using stuff like left:-100: etc. Not good.

Where am I going wrong? Can anyone correct me? (Obviously for the end result I won't have them all at left:10; this is just for illustration. Thanks. )
echo "<div style='position:absolute; left:10; top:10; width:700px;'>
<p style=' font-family:Verdana; font-size: 12pt'><b>Training record for ".$userref." ".$brand." ".$branchID.".</b></p>
<div>";
 
echo "<div style='position:absolute; left:10; top:40; width:150px;'><p style=' font-family:Verdana; font-size: 12pt'><b>some text</b></p><div>";
 
echo "<div style='position:absolute; left:10; top:40; width:200px;'>
<p style=' font-family:Verdana; font-size: 12pt'>Training Courses</p>
<div>";

Open in new window

Avatar of SirBrisc
SirBrisc

try instead of absolute -> relative and play with it
ASKER CERTIFIED SOLUTION
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RupertA

ASKER

ah dang it - lol - u are absolutely right bportlock. What a silly mistake to make.

Thanks - points given.