Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position relative ignored in innerHTML
Message
From
26/02/2017 05:49:42
 
 
To
26/02/2017 02:03:27
General information
Forum:
CSS
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01648528
Message ID:
01648530
Views:
29
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>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform