width

How can I apply table structure to select box options in HTML

末鹿安然 提交于 2019-12-11 00:18:54
问题 In my select box options, each option having three words.Now I want apply fixed widths for each word of the option so that the all options will come as i required for example My options are as follows : 1, aaaaa bbbbb ccccccccc 2, aaaaaaaa bbbbbbb cccc 3, aaaaaa bbbbb cccc but i want to display these options in the dropdown as 1, aaaaa bbbbb ccccccccc 2, aaaaaaaa bbbbbbb cccc 3, aaaaaa bbbbb cccc help me if anyone know how to do this 回答1: you can use div and CSS style .See this sample that i

Vertical buttons with equal width

独自空忆成欢 提交于 2019-12-10 22:54:53
问题 It's two vertical arrangement buttons. I need them to be of equal width. I don't know: what size will on wrap; what text will appear on buttons (therefore I can't use pixel width); what width will on buttons. Buttons must be at left. Text on buttons must be center-aligned. I can't use 100% width cause it will not beauty :) I can't use flexbox and specify width to buttons. And will be cool a solution on pure CSS. IE8+ .wrap{ width: 100%; border: 1px solid red; } .btn{ height 40px; background

Get the size of an element when inside a display:none parent

家住魔仙堡 提交于 2019-12-10 21:18:02
问题 I'm trying to get the width of an element which will be shown in a jquery-ui dialog. The dialog is set to display:none on load. This is not allowing me to get the width. Do I need to show it, get the width and hide it again immediately to get the width? Or is there some other option I'm not aware of? Thanks 回答1: You have two options: If your jquery-ui dialog must be display:none , the only way to get dimensions of its child is show/get_dimensions/hide. If you can set it to visibility:hidden ,

Automatically resize bars in ggplot for uniformity across several graphs R

时间秒杀一切 提交于 2019-12-10 20:43:23
问题 I generate several bars graphs in a loop, and they all resize according to the output size (assume from plot/device size?) rather than according to the bar size. This means that plots with two bars have fat bars, and plots with, say, 6 bars, have thin bars; both outputs are the same size though. The code below represents my script with reproduceable data (I do many other aes/theme changes to mine). I'd like the output plot to resize (in the dimension of bar width) so that the bars are always

width equal to dynamic height square [duplicate]

限于喜欢 提交于 2019-12-10 18:49:07
问题 This question already has answers here : Use CSS (and maybe JavaScript) to make an element be square (or maintain a specific aspect ratio) (4 answers) Closed 6 years ago . Is it possible with either css or js to set the width of an element to match it's height when the height is a % of the parent div. The child div also needs to change size if browser window is resized. Example body, html {height: 100%} .parent {height: 100%; width: 960px;} .child { height: 50%; width: same as height; /* but

iframe body remove space

℡╲_俬逩灬. 提交于 2019-12-10 18:25:20
问题 My iframe a style of style="width:100%" , and it almost covers the page width. But it leaves a small margin on the left and right side. So I added body { margin:0px; } to remove the space. It works, but the problem is that removing the margin on <body> affects other things, for example a paragraph <p> inside <body> . Is there a way to eliminate the margin only for the <iframe> ? Code: <!DOCTYPE html> <html> <body> <p> hello </p> <iframe src="http://www.weather.com" style="width:100%; height

Get the Div width without the scroll Bar width

北城以北 提交于 2019-12-10 18:00:07
问题 I am having a issue here. There are two div's here "div1" and "div2". Here I want to adjust the "div1" width according to the "div2" width. My requirement is The width of the scrollBar should not be included for the "div1" i.e i should set the height of the "div1" excluding the width of the scrollBar in "div2". I want a jquery function to find the width and to reduce the width of "div1".. Sample requirement is shown below html <div class="div1"></div> <div class="div2"

Dynamically adjusting the width of a combobox in Excel VBA

[亡魂溺海] 提交于 2019-12-10 17:39:11
问题 I'm struggling to set up a combobox (in Excel VBA) in such a way that its width is automatically adjusted according to the length of the longest string that it contains. I'm trying to create a drop-down list (using a combobox in a form named "WorksheetSelectionForm") that, once a particular workbook is opened, appears on screen and allows the user to select which of the workbook's worksheets they wish to open. I want the width of the combobox to adjust to the length of the longest text string

How to check if naturalWidth is supported?

送分小仙女□ 提交于 2019-12-10 15:48:34
问题 I have the following jQuery and wanted to test if naturalWidth is supported: function special(image) { if (typeof this.naturalWidth != 'undefined') { //do something } } But this doesn't seem to work ? Any ideas ? 回答1: Try this function special(image) { if (image && image.naturalWidth) { //do something } } 回答2: Why not just include a naturalWidth / naturalHeight polyfill? https://gist.github.com/2209957 Given that, you can write code like alert($(img).naturalWidth()) where you'd otherwise have

change width of a div dynamically

不羁的心 提交于 2019-12-10 15:45:51
问题 I am trying to change my "inner" div's width dynamically on the click that the images are changed (which works) with a similar script. I cannot get the script to work, any help fixing it, or changing it would be appreciated. I am a noob in javascript so please be nice ;-) <script type="text/javascript"> function setBase(baseval) { var images = document.getElementById("mylist").getElementsByTagName("img"); for (var i = 0; i < images.length; i++) { images[i].src = baseval + ((i<9)?0+i:i) + "