width

My iPhone thinks it's 980px wide

半世苍凉 提交于 2019-12-04 22:51:20
I'm trying to create a set of three very simple media query's to handle a range of screen sizes. Here's what I came up with, after a bunch of headscratching: @media all and (min-width: 0px) and (max-width: 480px) { styles here } @media all and (min-width: 481px) and (max-width: 1023px) { styles here } @media all and (min-width: 1024px) { styles here } This works as I expected in browsers, but when I point my iphone at it, it insists on displaying the syles for the medium size. Playing with the numbers, I found that only with a max-width of 980px does the iphone respond to the styles within

IE8 ignores td width, works on IE7

允我心安 提交于 2019-12-04 22:28:38
There is a table looking like this: <table width="100%"> <tr id="header"> <td colspan="2"></td> </tr> <tr id="center"> <td id="left" style="width: 201px"></td> <td id="mainpage" style="width: 100%"></td> </tr> </table> In every browser (including IE7) apart from IE8 the "left" td is fine. In IE8 it exceeds the width according to the mainpage's content. I'd post some screenshots but it's my first post here. Any ideas whatsoever? That width: 100% on the second column doesn't look right - if you're trying to make the second column expand to the rest of the available space, you shouldn't need that

Width: 100% Without Scrollbars

一曲冷凌霜 提交于 2019-12-04 22:21:06
I'm trying to make a part of my webpage that fit the width of the browser, for this I'm using width: 100% , the problem is that it shows scrollbars and I can't use overflow-x: hidden; because it will make some of the content hidden, so how I can fix this? #news { list-style-type: none; position: absolute; bottom: 0; width: 100%; text-align: center; margin-right: 10px; margin-left: 10px; padding: 0; -webkit-user-select: text; } Because you're using position: absolute , instead of using: width: 100%; margin-right: 10px; margin-left: 10px you should use: left: 10px; right: 10px That will make

Legend box width not correct when using par

 ̄綄美尐妖づ 提交于 2019-12-04 20:51:00
问题 I have the problem , that my legend is too large, my code: par(mfrow=c(1,2)) hist(alvsloss,breaks = 100, freq=F,main="Histogramm, density curve (gaussian kernel) \n and fitted normal distribution of Allianz simple losses ",xlim=c(-0.15,0.15),xlab="loss",ylab="density",cex.axis=1.2,cex.lab=1.2) lines(density(alvsloss), col="black", lwd=2) curve(dnorm(x, mean = mean(alvsloss), sd = sd(alvsloss)), add=TRUE, col="black",lwd=2,lty="dotted") legend(-0.155, 30, c("(Gaussian) Kernel density","fitted

CSS width in Percent related to the grand parent

混江龙づ霸主 提交于 2019-12-04 20:43:10
How to relate width in percent to the grand parent? You could simply relate width of li s to the parent ul which in turn it relates to the grand parent div : div{ overflow: hidden; width: 100%; } ul{ width: 1000%; } li{ width: 3%; } Use javascript: var g = document.getElementById('grandparent'); var w = g.clientWidth; if (w > 400) w *= .3; var c = document.getElementsByClassName('child'); for (var i=0; i < c.length; i++) { c[i].style.width = w+'px'; } I have a jsfiddle example . 来源: https://stackoverflow.com/questions/31317438/css-width-in-percent-related-to-the-grand-parent

Canon EDSDK How can I get width and height of live view images?

血红的双手。 提交于 2019-12-04 20:36:33
I written C++ code to display live view image on monitor. I referred to some code on stackoverflow. Finally, I complete my code, but there are some problem. I want display live view image using opencv, but I don't know to get the width & height of live view image. (maybe it is retrieved by EDSDK function..) please answer for me. (I attached my code, I want suitable answer for my code) (look at "//libjpegTurbo...//, there are manual _width & height. I want to retrieve using function) // Functions_body bool LiveViewStart() { EdsError err = EDS_ERR_OK; EdsCameraListRef cameraList = NULL;

Cropped Image size in Android is constant

自古美人都是妖i 提交于 2019-12-04 19:24:14
I am cropping an image in circular fashion and using below code while creating the intent intent.setData(mImageCaptureUri); intent.putExtra("outputX", 200); intent.putExtra("outputY", 200); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); Since I am using outputX = 200, I am getting width and height of every cropped image as 200 and 200 , no matter how much I zoom-in or zoom out. Below shown both images have different zoom ratio but still return same height and width. width = bitmap.getWidth(); Can someone please tell me what parameter should I use in line intent.putExtra("outputX

Align width of container div to the sum of floating div

天涯浪子 提交于 2019-12-04 19:06:10
问题 I have the following html: <div class="main_container"> <div class="sub_container"> <div class="floating">wookie1</div> ... <div class="floating">wookie5</div> </div> </div> Consider it's like an image gallery. main_container has an unfixed size, it's set as a percentage of the user resolution. I want sub_container to have the exact width of the sum of the floating div. If I use "display:table;" for sub_container and "display: inline-block;" for floating divs, it works fine: until I have

Column width not working in DataTables bootstrap

梦想与她 提交于 2019-12-04 17:40:28
问题 I am using the following code to set the column width of a DataTable. During partial page load the width appears to be correct and when it loads completely, the width is off. <script> $(document).ready(function () { $("#memberGrid").dataTable({ "dom": 'T<"clear">lfrtip', "tableTools": { "sSwfPath": "../../Content/swf/copy_csv_xls.swf" }, "destroy": true, "info": true, "bLengthChange": false, "bFilter": false, "bAutoWidth": false, "aoColumns": [{ "sWidth": "20%" }, { "sWidth": "20%" }, {

JTabbedPane tab component resize to fit

好久不见. 提交于 2019-12-04 17:08:33
I want to make my tab labels share the JTabbedPane width. If there's one tab, fit whole width, if two tabs, share width, if three, 1/3 for each and so on... i don't even know if it's possible to do it without putting a component there and resizing it, maybe JTabbedPane has a way of resizing it's tab label via method and i don't know... Anyone got any idea how to make it by the easiest way possible? As @trashgod already noted, the tab layout is handled by the LAF-specific SomeLAFTabbedPaneUI, more specifically the TabbedPaneLayout. So the way to go is implement a custom subclass