width

Android Listview width prob

自作多情 提交于 2020-01-07 08:09:23
问题 Here is the main layout for a screen: <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/splashContent" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/splashscreenbg"> <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight=".008" android:gravity="center" android:background="@drawable

HTML5 canvas style height vs attribute height

喜夏-厌秋 提交于 2020-01-07 04:35:10
问题 I am currently learning how to use HTML5 new elements and I stumbled upon a frustrating issue with all graphic functions such as fillRect() and drawImage(). I was setting the widgth and height with style="width: 75px;height: 10px;" instead of width="200" height="100" The result being that the graphics would not be the proper scale ever. My question is, why does it make a difference? There is something I obviously do not understand about it all. Thank you 回答1: I know that at least in JSF

custom height and width in custom inflate alertdialog layout android

两盒软妹~` 提交于 2020-01-07 02:17:06
问题 i'm trying to inflate a custom layout in an alertdialog. I get it, but width is expanded to fill_parent. I have tried in xml file to put wrap_content or custom size (example 200dp) and it's ever fill_parent. I want to put my own height and width, like (200dp, 150dp), how can i put this? I have read and tried some solutions in this web, but i can't solve my problem, can anyone help me? thanks in advance for it. I give my java code here `>View ff = getLayoutInflater().inflate(R.layout

Change button size according to Screen width

筅森魡賤 提交于 2020-01-07 00:36:32
问题 I have implemented a drop down list which contains text and an icon. I want to know how can I remove the text and keep the icon when the screen with is smaller (like max-width: 768 px). Is it possible to change the text of the div? Or I need to create another one and just show/hide both according to the screen width? My code is: <button onclick="myFunction()" class="dropbtn">My List <i class="fa fa-arrow-circle-down" aria-hidden="true"></i></button I want to remove the text and keep the icon.

Change button size according to Screen width

巧了我就是萌 提交于 2020-01-07 00:36:27
问题 I have implemented a drop down list which contains text and an icon. I want to know how can I remove the text and keep the icon when the screen with is smaller (like max-width: 768 px). Is it possible to change the text of the div? Or I need to create another one and just show/hide both according to the screen width? My code is: <button onclick="myFunction()" class="dropbtn">My List <i class="fa fa-arrow-circle-down" aria-hidden="true"></i></button I want to remove the text and keep the icon.

Is Firefox the only browser that supports floating point numbers as width declaration? (e.g. 163.4px) [duplicate]

懵懂的女人 提交于 2020-01-06 07:55:15
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Are the decimal places in a CSS width respected? I have a navigation ( li ) which needs a pixel value to fit within an ul (has display:block ). So I use width:163.4px for the li 's. This does work fine in Firefox (v13.0.1) but in Safari, Chrome and Opera the width is too short. (The width is there like 163px... So I guess those browsers rounding down the value.) Explain me why only Firefox does support floating

set width of fixed div equal to that of parent width (which is declared as percentage)

谁都会走 提交于 2020-01-06 03:40:05
问题 I want to have the width of a position: fixed div (because I want it to be able independently of page scrolling) equal to the width of its parent ( a td element ). However I cannot seem to achieve that. My current code is: html: <table style="width: 90%; border: 1px solid black;"> <tr> <td id='tdLeft'> fdsfsdfsd<br><br><br><br><br><br><br><br><br> fdsfsdfsd<br><br><br><br><br><br><br><br><br> fdsfsdfsd<br><br><br><br><br><br><br><br><br> fdsfsdfsd<br><br><br><br><br><br><br><br><br> fdsfsdfsd

resize both width and height of a div while window resize using css

会有一股神秘感。 提交于 2020-01-05 22:29:11
问题 is there any way to resize both width and height of a div in correlation with the browser resize using css? I have already achieved width resize but can't find how to resize the height in correlation. 回答1: Use viewport-percentage lengths: 5.1.2. Viewport-percentage lengths: the ‘vw’, ‘vh’, ‘vmin’, ‘vmax’ units The viewport-percentage lengths are relative to the size of the initial containing block. When the height or width of the initial containing block is changed, they are scaled

How to dynamically add more width inside a div?

不羁的心 提交于 2020-01-05 09:38:08
问题 I've created a timeline with jQuery UI. To my problem: If I add more years with images and text, how to dynamically add more space inside that div? In this case: #timline . The problem occurs when I'm adding more years, I need to change the width inside timeline. It is set to more than 3000px. How can I prevent this? Heres a fiddle on the case HTML: <div id="timeline-container"> <div id="timeline-header"> <h1>Journey</h1> <h2>Show years</h2> </div> <div id="slider"></div> <ul id="timeline">

Output external image with cURL, but how do you change the width of the image?

↘锁芯ラ 提交于 2020-01-05 08:21:16
问题 header('Content-type: image/jpeg'); $url = $_GET['url']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $file = curl_exec($ch); curl_close($ch); echo $file; Can anyone please tell me how I can change the width of $file to 300px? 回答1: If the image is heading for a browser inside an <img> tag, then you can get the browser to rescale it by changing the