Solved

simple layer question in php

Posted on 2009-04-03
3
177 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:RupertA
3 Comments
 
LVL 1

Expert Comment

by:SirBrisc
ID: 24060932
try instead of absolute -> relative and play with it
0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 24060969
You are not closing your DIVs. It should be </div>

echo "<div style='position:absolute; left:10px; top:10px; 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:10px; top:40; width:150px;'><p style=' font-family:Verdana; font-size: 12pt'><b>some text</b></p></div>";
 
echo "<div style='position:absolute; left:10px; top:80; width:200px;'>
<p style=' font-family:Verdana; font-size: 12pt'>Training Courses</p>
</div>";
0
 

Author Comment

by:RupertA
ID: 24061100
ah dang it - lol - u are absolutely right bportlock. What a silly mistake to make.

Thanks - points given.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now