font-size

How to fix this kind of problem?

放肆的年华 提交于 2019-12-13 16:42:13
问题 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>test</title> </head> <body> <br /><br /><br /> <div style="line-height:150%"> <span style="display:block;font-size:240%;">test</span> </div> </body> </html> First double click on the text test ,then it's highlighted, then you can see via firebug

is font/text sizing in % more accessible and manageble than em?

China☆狼群 提交于 2019-12-13 07:28:46
问题 Both article are proving this. http://www.kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/ http://www.maxdesign.com.au/presentation/relative/ I want to know SO users view? 回答1: The only differences between % and 100 * em (for setting font size) is that there are a few browser bugs relating to the use of em units (which can be worked around with an explicit body { font-size: 100%; } and then using em units thereafter.) The kyleschaeffer article is, frankly, rubbish. It leaves

Decimal ignored when changing font size with JS

杀马特。学长 韩版系。学妹 提交于 2019-12-13 07:15:36
问题 I'm trying to add some text resize functionality using this code: $('#text-resize a').click(function(){ var currentValue = $('#page-body').css('fontSize'); var currentSize = parseFloat(currentValue, 10); var fontUnit = currentValue.slice(-2); var newSize = currentSize; if ($(this).attr('rel') == 'decrease'){ if (currentSize > 13){ var newSize = currentSize / 1.2; } } else if ($(this).attr('rel') == 'increase'){ if (currentSize < 19){ var newSize = currentSize * 1.2; } } else { newSize = 1;

@font-face font-size rendered larger in some browsers than others

微笑、不失礼 提交于 2019-12-13 07:06:52
问题 i have created a header on my website that uses custom font-faces and have applied a size with pixels (61). and for some unknown (to me) reason the font is rendered nearly twice as large in ie9 and tor than in chromium and firefox. there are no other css settings that appear to me to be relevant (e.g. no font-weight:bold or similar settings). other font-faces appear to render close to or exactly the same size between browsers. i've exhausted my ideas on what is the cause of this.. if anyone

Autolayout UIButton and UILabel font size according to specific type of the iPhone size[NOT PROGRAMMATICALLY]

与世无争的帅哥 提交于 2019-12-13 06:27:03
问题 I want to set different font size according to the IPhone size (4, 4.7 or 5.5 inch) Here is one of the solution But I want to ask is there is any way to auto resize UIButton / UILabel font size through interface builder without code? For example, how it works with holding ratio width - height of the UIsmth size? If there is no way to do it as I described - what is the best practice to set font sizes. Should I do it as separate file for each UI element or it s better to do it in the

font-size 0 still shows up in IE7

扶醉桌前 提交于 2019-12-13 04:58:42
问题 For some odd reason, when I set a font-size:0px; in my style-sheet for an anchor link, IE7 still shows a tiny-tiny version of the text. Is there anything I should consider doing to completely hide the text, without using text-indent? The anchor itself is using a background image in the css. And I simply want to hide the text that in the anchor link, on the HTML page. 回答1: visibility: hidden and display: none are the standards in hiding elements. The difference between the two is that

Changing font size options on WYSIWYG editor?

蹲街弑〆低调 提交于 2019-12-13 04:49:24
问题 So I have a bootstrap wysiwyg editor from a jqueryscript.net plugin and I'm trying to give more font options in the font size dropdown. So I went into the JS and found the var for it and changed it from like small, medium, large, huge into more precise sizes like 10px, 11px, 12px, etc. But when I got into the editor to test it out, it's still using the old font sizes, so when I go from like 5px-10px it's the small medium size.. etc. I've looked and looked and looked in the JS which isn't too

Relation between length and font-size of a string and width of a textbox

[亡魂溺海] 提交于 2019-12-13 03:34:14
问题 I've a field in a database, this field has a maximum length, and I want to set a textbox to the appropriate width. I'm creating the textboxes in runtime. How can I calculate the value of width property? For example, if I have a field nvarchar(5) named IDClient, and the font-Size is 13, I want to create a texbox with a width enough to write 5 chars. 回答1: Maybe should use TextRenderer.MeasureText(string, font). Here a little sample which should might help you //Get this value from somewhere...

Alternative CSS font settings for different browsers?

痴心易碎 提交于 2019-12-13 01:48:53
问题 Just curious if there was a way to change font size on a website depending on the browser. I have an @font-face that works in Chrome and Safari, and then my alternative font choice is being used in Internet Explorer and Firefox. My alternative font choice renders larger than my preferred choice. Is there a way to change the font size for only IE and Firefox? Thanks! 回答1: You can detect the browser using JS and add a class to the HTML tag. You could use the following library for this: http:/

Modifying the font size for all JPanels in an ArrayList<JPanel>

梦想与她 提交于 2019-12-13 00:56:21
问题 So, I have an ArrayList that contains JPanels; all the JPanels have a BorderLayout with a JPanel (that contains two JLabels) set on NORTH and a JTextArea (containing text, of course) set on CENTER. My question is how do I modify each JTextArea's font size? 回答1: Here is some simple code that allows the JTextArea font sizes to be set via a setFontSize(int index, int fontSize) method. Note that this will only work for the text areas in the panels array list. In the following example, I have