Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get execCommand and 'fontsize' to work with pt or px

Status
Not open for further replies.

shepherd

Programmer
Nov 8, 2000
48
US
Hi,
I'm trying to dynamically edit selected text using execCommand and fontsize as the passed command. [i.e. execCommand(fontsize,'',4) ]. The problem is that this works fine for relative browser sizes, but I need it to work for absolute sizes as well - either points or pixels. I've scoured the internet trying to find documentation on this, but it seems that it may not be possible. Does anybody have insight into this?

thanks!
 

I don't think this is possible, as the the font size specified:

MSDN said:
must be a value between 1 and 7, inclusive

Which pretty much means no arbitrary size, but just relative sizes 1-7.

Dan


The answers you get are only as good as the information you give!

 
I agree. The whole reason for specifying a unit size is so it won't change. If you want it to change, you'll have to specify a different size for each occurrence that the size is specified or inherited. Or else use a variable unit size like a percent or the keywords "larger" or "smaller".

Adam

Pedro offers you his protection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top