Hi,

I would like to know if there is a way how PHP code can extract from
ElementID some property values.

for example, i have the following PHP page :

<?php
print "<div class='maindiv' id='id_maindiv'>my main div</div>";
$new_Width = somefunction();
print "<div class='childdiv' id='id_childdiv'
style='width:".$new_Width."px;'>my child div</div>";
?>
in my CSS file (which is link to my HTML page), i have :

.maindiv
{
width : 300px;
height : 400px;
background-color : #EEBBEE;
}
.childdiv
{
background-color : #BBBBBB;
}

my PHP code should be able :
- to extract the width of id_maindiv ID (so to get 300px) and to reduce it
by 50px

the problem is that i tried with Javascript and if the property
(style:width) is not define DIRECTLY to HTML code (but only in CSS file),
the javascript is not able to return the value (but only 'undefined').
So i would like to know if PHP could help me in this way ?

thanks a lot,

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5

Reply via email to