width

fixed layout + wide content = tables?

核能气质少年 提交于 2019-12-24 00:27:02
问题 I have a webpage which has fixed width layout. It used tables before and I re-created it using divs. In general I am happy with it (footer sticks to the bottom nicely now). But there is a problem - I cannot control the contents and sometimes it can contain very wide elements. In current (divs) layout, if element doesn't fit to screen you have to scroll right (you can't avoid that) and there page frame ends, you would see blank space (i.e. no header, footer). The cause of it is that div only

HTML Div Width with Overflow: Auto?

一个人想着一个人 提交于 2019-12-23 22:59:52
问题 I'm creating a div like the following: Edit: Here's an example: <html> <body> <table> <tr> <td> <div style="position: relative; overflow: auto; max-height: 15em;"> <label><input type="checkbox"/>Hello! Hello!</label><br/> <label><input type="checkbox"/>Hello! Hello!</label><br/> <label><input type="checkbox"/>Hello! Hello!</label><br/> <label><input type="checkbox"/>Hello! Hello!</label><br/> <label><input type="checkbox"/>Hello! Hello!</label><br/> <label><input type="checkbox"/>Hello! Hello

KineticJS android stage size

自作多情 提交于 2019-12-23 21:15:14
问题 Definining KineticJS Stage I go like this: var stage = new Kinetic.Stage({ container: 'container', width: 320, height: 480 }); So width and height of stage are fixed size. How to stretch it to fit on phone screen if resolution is different? 回答1: Well, this is really a javascript question. You want to make the size of the stage same as the window size. This worked for me on my android project: var stage = new Kinetic.Stage({ container: 'container', width: window.innerWidth, height: window

firefoxs renders thin grey lines at content box edges of a png at certain widths - why?

余生长醉 提交于 2019-12-23 17:29:05
问题 When firefox (3.0.6) renders a png image at certain widths (e.g., 50%), a thin grey line is shown along the left and top edges of the content box. The line disappears at other widths (e.g., 70%). Furthermore, the line doesn't seem to be present in the original image (using gimp to inspect the image). The phenomenon occurs in the absence of the CSS style markup -- in the HTML example below, the CSS is present to clarify where the grey lines are located -- it seems clear that the grey lines are

android Navigation Bar hiding and persantage of usable screen overlap

ぐ巨炮叔叔 提交于 2019-12-23 15:44:52
问题 My problem is about persantage of usable screen . My application working well normally but ı assume that if ı change dimension of screen (for example galaxy s8+) it is down. this is how is working fine strong text and this is the wrong one the problem related with NavigationBar. I tried to set MACHPARENT params and normally I use programmatically DisplayMetrics metrics = this.getResources().getDisplayMetrics(); width = metrics.widthPixels; height = metrics.heightPixels - Utils

gap between two 50% width divs

不问归期 提交于 2019-12-23 12:36:14
问题 I have a container <div> with a width of 181px. I have two child <div> elements in my container div each with a width of 50%. My problem is that each of my child <div> elements has a width of only 90px, resulting in a 1px gap between the two. Any suggestions for removing the gap? 回答1: Set the width of one div as 50% and the other can use the standard block behavior of consuming the rest of the width: <div style="width: 181px;"> <div style="width: 50%; float: left;"></div> <div></div> </div>

How do I get the width of a scaled SVG element with JavaScript?

为君一笑 提交于 2019-12-23 09:35:28
问题 If I have inline SVG, including an element which has been scaled... <g transform="scale(sX,sY)"> <rect id="myElement" x="107" y="32" width="245" height="31" stroke="#C6C3C6" stroke-width="1px" /> </g> ... or which is in a <svg> element with a viewBox attribute: <svg viewBox="20 20 5000 1230"> <g transform="scale(sX,sY)"> <rect id="myElement" x="107" y="32" width="245" height="31" stroke="#C6C3C6" stroke-width="1px" /> </g> <svg> ... how can I programmatically find the new scaled width in

CSS dynamic width larger than 100%

可紊 提交于 2019-12-23 08:29:37
问题 I have a parent container that holds a list of floated items. The parent container does nicely expand to the right when new floated items are added. But as I add more items and the items come near the right side of the window the new item just jumps to a new row. Instead, I want it to keep expanding to the right, making my parent container larger than 100%. Is it possible to define a container width to be something like max-width: infinite;? To answer my own question I know I just can make a

Set percentage width for span element

你。 提交于 2019-12-23 07:27:51
问题 A straight forward question.. is it possible to set the width in percentage for a span tag in CSS? for example: <span style="width: 50%">...</span> etc.. In my project I'm currently using divs but ofcourse after each div tag a line break gets inserted (which I don't want). So the most obvious solution to that is then to use span tags instead of div. But then I'm not able to define the width for the span tags.. Atleast not in a percentage kind of way. Thanks in advance for any help! 回答1:

Creating dynamically sized square (equal height and width) UI elements in Android

梦想的初衷 提交于 2019-12-23 05:46:06
问题 As the title states, I am trying to set the width of a layout element to be equal to the height (which is set to match the parent). I've tried setting the width parameter programatically from the height parameter, but this shows up as -1 rather than the actual height (since it matches the parent). Anyone know how I can create square layout elements whose size is dynamic? Thanks. 回答1: So what I've been doing for things like this -- and I don't know that it's ideal, but it works quite well --