Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position relative ignored in innerHTML
Message
De
26/02/2017 05:49:42
 
 
À
26/02/2017 02:03:27
Information générale
Forum:
CSS
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01648528
Message ID:
01648530
Vues:
30
Hi Michel
you can apply any style to the extracted innerhtml putting it in an element div or others.
this is an example with javascript using DOM syntaxe .its also very usefull from foxpro to traverse the document and all its childs(particulary for applying css/css3 styles).
<script>
function yf(){
var x=document.getElementById("odiv").innerHTML;
var y=document.getElementById("yb");

y.innerHTML=x;
y.style.border="thick solid #0000FF";

y.style.padding="5px";
y.style.position ="absolute" ;      
y.style.left="300px" ;
y.style.width="350px" ;
}
</script>

<div id="odiv">
<h2>This is a div  with an absolute position</h2>
<img src="https://www.levelextreme.com/thread/00079336.jpg" width='100' height='100'>
<p id="yb1" >With absolute positioning, any element can be placed anywhere on a page. The div below is placed 300px from the left of the page and 350px from the top of the page.
All styles can be done with DOM syntax (even out of javascript ,from visual foxpro codings).
for more info:can search in  https://www.w3schools.com/   (very usefull).
</p>
</div>
<hr>
<div id='yb'></div>
<br>
<button style="cursor:pointer;float:right;" onclick="yf()">Click me</button>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform