Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show all P element certain width and centered
Message
From
13/04/2018 20:42:23
 
General information
Forum:
HTML5
Category:
Browser issues
Miscellaneous
Thread ID:
01659394
Message ID:
01659404
Views:
34
i dont know anything on your project.i gave you a code how to change dynamically the p tags in any web page as you want using collections.
you can build directly by codes (css+html) a web page and then navigate to it.
you can make some programmatly codes to do that also using the DOM architecture.
this is an example:
Declare Integer BringWindowToTop In user32 Integer HWnd
Local  apie
apie=Newobject("internetexplorer.application")  &&can be embed browser also (shell.explorer.2 oleclass)
With apie
	.Navigate("about:blank")
	Inke(1)  &&to access to document object
	Local m.myvar
	TEXT to m.myvar noshow  &&write all your styles here
p{
width:700px;
text-align:center;
color:rgb(255,0,0);
fontsize:20px;
fontFamily:courier new ;
fontstyle:italic;
padding:15px;
background-Color : cyan;
border-Radius : 25px;
border:solid rgba(255,120,140,0.8);
}
body {
font: 20px verdana;
background-color:bisque;
}
	ENDTEXT

	Local m.x,m.t
	With .Document
		m.x = .createElement("STYLE")
		m.t = .createTextNode(m.myvar)
		m.x.appendChild(T)
		.Head.appendChild(x)
	Endwith

	Inke(2)
	Local m.y
	TEXT to m.y noshow
 <center>
 <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin vel risus eget lorem feugiat
fermentum nec a turpis. Phasellus purus sem, mollis ac posuere eget, ornare vel orci. Sed ac rutrum</p>
<br><br>
<p>nulla. Aenean ultrices eget lectus eu efficitur. In hac habitasse platea dictumst. Nulla in iaculis nisi.</p>
<br><br>
<p>Nullam et pulvinar tellus. Donec arcu dui, efficitur a odio non, porta congue dolor. Aenean viverra
auctor sagittis. Integer lobortis dignissim auctor. Proin et volutpat massa.</p>
</center>
	ENDTEXT
	.Document.body.innerhtml=m.y
	.menubar=0
	.Toolbar=0
	.StatusBar=0
	BringWindowToTop(.HWnd)
	.Visible=.T.
Endwith
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform