c# - WebBrowser font size in pixels -


i trying set font size in c# webbrowswer in pixels.

i tried:

webbrowser1.document.write(@"<span style=""font-size:10px"">text </span>"); 

but number before "px" doesn't seem have affect.

what doing wrong?

edit: whole function:

private void form1_load(object sender, eventargs e) {     webbrowser1.navigate("about:blank");     webbrowser1.document.write("<span style=\"font-size: 50px; color: #f00; \">big red writing!</span>"); } 

update: tested exe file on pc , worked properly. here, <font size="7">...</font> doesn't work. give same size. ideas?

you can try :

webbrowser1.navigate("about:blank"); htmldocument objhtmldoc = this.webbrowser1.document; objhtmldoc.write("<span style=\"font-size:10px\">text </span>"); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -