width

How do I have a static height/width sidebar and bottom bar with a respnsive main content area that houses an iframe?

十年热恋 提交于 2021-02-04 21:14:25
问题 I want to display a web page that is just an iframe, with a fixed width sidebar and a fixed height bottom bar. It will look like this: This is where I'm at now, which doesn't work: <style> body {margin:0;overflow:hidden;background-color:#f4f4f4;} #iframe {position:absolute;left:0px;top:0px; width:100%; height:100%; padding:0px 200px 100px 0px;} #bars {width:100%;height:100%;} #bottombar {width:100%; height: 100px; position: absolute; bottom: 0; background: grey} #sidebar {width:200px; height:

how to set width relative to grandparent elements not direct parent elements?

不问归期 提交于 2021-02-04 18:17:00
问题 i'm trying to set some elements' width with percentage relative to grandparent elements' width. like this. <style> .grand{width:1000px; overflow:hidden;} .parent{width:2000px; position:relative} .child1{float:left; width:50%; height:200px; background-color:blue;} .child2{float:left; width:50%; height:200px; background-color:green;} </style> <div class="grand"> <div class="parent"> <div class="child1"></div> <div class="child2"></div> </div> </div> But i have no idea how to make this done, how

Setting width and height as a percentage in JavaScript

南笙酒味 提交于 2021-01-29 15:57:15
问题 Here is my JavaScript code: a.width = a.width ? a.width : 640; a.height = a.height ? a.height : 360; How can I make the 640px and 360px percentages instead? I want them both to be 70% of the windows size. 回答1: If the container of the element have sizing specified already, then you can simply use percentages in CSS. For instance: .#my-el { width: 70%; height: 70%; } <div id="my-el"></div> However, if you have to use JavaScript for some reason, you could do something like: el.style.width = Math

why css width property is working with input element

半世苍凉 提交于 2021-01-29 03:00:32
问题 According to CSS docs: The width CSS property ... applies to all elements but non-replaced inline elements, table rows, and row groups Input is inline element. So why width property is work with input element? 回答1: The exception is for non-replaced inline elements . Input is a replaced element. Replaced element In CSS, a replaced element is an element whose representation is outside the scope of CSS. These are kind of external objects whose representation is independent of the CSS. Typical

Why does mobile Safari cut off the text in an input form?

回眸只為那壹抹淺笑 提交于 2021-01-28 11:57:26
问题 Why does an input form on mobile Safari have more padding inside it and push the text to the right so it gets cut off? I set the width of the input field at 20px which is plenty for the desktop web but on mobile it needs >26px. ^ Desktop Safari Web Input Form ^ ^ Mobile iOS Safari Input Form ^ CSS .phone-input { width: 20px; text-align: center; font-size: 16px !important; height: 1.75em; //border: 0; outline: 0; background: transparent; } HTML '<div class="phone-field">'+ '(<input class=

Put an iframe on the right

寵の児 提交于 2021-01-28 10:32:44
问题 So I want to make an iframe for a page that would display a selection of teas and herbal teas, and I want the options on the left in another iframe. Though, it's been so long I haventdone that and I oly didit with DreamWeaver before (I'm unexperienced so I followed a teacher's tutorial), so the software generated most of the code, really. Could anyone help me please? Right now, here's the iframe's code along with the banner: <div class="container"> <img src="images/bannersite.png" alt="Banner

Put an iframe on the right

我只是一个虾纸丫 提交于 2021-01-28 10:30:53
问题 So I want to make an iframe for a page that would display a selection of teas and herbal teas, and I want the options on the left in another iframe. Though, it's been so long I haventdone that and I oly didit with DreamWeaver before (I'm unexperienced so I followed a teacher's tutorial), so the software generated most of the code, really. Could anyone help me please? Right now, here's the iframe's code along with the banner: <div class="container"> <img src="images/bannersite.png" alt="Banner

iText7: How to get the real width of a Paragraph

为君一笑 提交于 2021-01-28 09:13:57
问题 I need to know the width (in point) of a Paragraph before add to the document. I searched here and found Alexey answer about Paragraph's height. So I made it with width, but it doesn't work. Always return the Rectangle's width no matter how long the Paragraph. I tried this code: private float getRealParagraphWidth(Document doc, Paragraph paragraph) { // Create renderer tree IRenderer paragraphRenderer = paragraph.createRendererSubTree(); // Do not forget setParent(). Set the dimensions of the

Don't Display Read the Docs Sphinx TOC in Narrow Windows

会有一股神秘感。 提交于 2021-01-28 05:06:47
问题 With a narrow window the full Read the Docs window displays content but when the window is widened a Table of Contents appears as a sidebar and the content is less than half the window width. How can the setting be changed so the window must be wider before the TOC is displayed? I expect this framework with a stylesheet, conf.py reference and custom layout would work with the appropriate css in the source/_static stylesheet. Changing: .wy-nav-content { max-width: 1200px !important; } I assume

Html table extending off the screen

谁说我不能喝 提交于 2021-01-27 23:41:28
问题 I have a table, which extends off the screen to the right (it has fixed with and this width is larger than screen width). Browser automatically creates scroll bar at the bottom. How can I instruct browser, while displaying this table in "invisible" area to the right, not to create a scroll bar? The purpose of this exercise that this table will be scrolled left using Javascript, showing its contents to the right which is initially off the screen. If I set "overflow:hidden" for the "body", all