width

Set the height of a div to be half of whatever the width is

拟墨画扇 提交于 2019-12-31 21:45:12
问题 How can I set the height of a div to be exactly half whatever the width is, when the width will change depending on the users screen size? I have the following set on a div... #div1 { min-width:400px; width:100%; max-width:1200px; height:400px; background-color:red; } The width works fine on this, it locks at 400 pixels if the screen gets too narrow and it also stops expanding at 1200 pixels if the screen gets too big. But, I also want the height to change to be exactly half of what the width

Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

岁酱吖の 提交于 2019-12-31 10:03:22
问题 I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> Even if the content in portrait mode run over, the width is correct and the user can scroll down. The display

Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

大城市里の小女人 提交于 2019-12-31 10:02:48
问题 I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> Even if the content in portrait mode run over, the width is correct and the user can scroll down. The display

How do I make a wordpress theme full width?

血红的双手。 提交于 2019-12-31 07:25:33
问题 I tried my best but I couldn't make the following theme full width/screen by editing the CSS. I'd be very much grateful if you could show me or give me a hint regarding this customization. http://demo.mythemeshop.com/sociallyviral/ You see the footer in the above theme(It's full width), how do I make the whole theme's body/container full width like the footer? Note: I tried adding/removing margins/paddings etc. 回答1: To accomplish something like this http://i.imgur.com/mekVyJg.jpg you will

JQuery Mobile: Adjusting Width and Height of Grouped Select

余生长醉 提交于 2019-12-31 06:41:06
问题 I had a problem before positioning grouped select but fortunately been fixed. now I am having problems with resizing, adjusting width/height of the grouped select. If there is anyone who can help me I will greatly appreciate it. below is my code... this is my code to position it on the screen, even if i add width and height to this it seems like it is not updating. I also noticed that the width changes based on the length of the selected item. eg is when i select "September" the width of the

Android : Unable to set TableLayout properly as wanted

假如想象 提交于 2019-12-30 11:27:09
问题 I am showing data from DB in an Activity. I want a Table and buttons on bottom. For data thought TableLayout would be best option for it. I added TableLayout to HorizontalView & to ScrollView making it scroll vertically & Horizontally. Am adding all rows dynamically - including header. This part is working fine. I want is when the contents is less than the screen width, it should yet occupy the whole screen width. For eg. If a table fits well in Portrait mode then ofcourse for Landscape mode

How to make the absolute child width independent from the relative parent width?

て烟熏妆下的殇ゞ 提交于 2019-12-30 09:29:07
问题 I need to realize this menu with its submenu: I set the main menu to be a ul / li with li float: left; display: block; and inside them there is an a element with properties display: block; and some padding. Every li has position: relative . Inside every li there is a .main_menu_submenu div, with position: absolute . Inside, it has another ul / li where every li has again properties display: block; float: left . The problem is that the width of .main_menu_submenu adapts depending on the width

How do I set the width of an Tkinter Entry widget in pixels?

徘徊边缘 提交于 2019-12-30 08:50:08
问题 I noticed that the width argument for the Tkinter entry widget is in characters, not pixels. Is it possible to adjust the width in pixels? 回答1: You cannot specify the worth in pixels using the '-width' option, but there are ways to accomplish the same thing. For example, you could pack an entry in a frame that has no border, turn off geometry propagation, then set the width of the frame in pixels. 回答2: You can also use the Place geometry manager: entry.place(x=10, y=10, width=100) #width in

ggplot2: how to reduce space between narrow width bars, after coord_flip, and panel border

烂漫一生 提交于 2019-12-30 07:17:30
问题 When you have flipped coordinates, how do you reduce the space between bars that are narrow and the panel border? Using the data frame df and the ggplot commands, there is much white space between the bottom bar and the tick marks (and similarly a wide space above the "vendor" bar). df <- data.frame(x = c("firm", "vendor"), y = c(50, 20)) ggplot(df, aes(x = x, y = y)) + geom_bar(stat = "identity", width = 0.4) + theme_tufte() + coord_flip() + labs(x = "", y = "") I tried scale_x_discrete with

GWT CellTable - set column width

╄→гoц情女王★ 提交于 2019-12-30 05:44:04
问题 Is it possible to set the column width of CellTable in GWT? 回答1: EDIT: As of GWT 2.2 table.setWidth and table.setColumnWidth are supported table.setWidth("100%", true); table.setColumnWidth(nameColumn, 35.0, Unit.PCT); table.setColumnWidth(addressColumn, 65.0, Unit.PCT); I was able to extend the CellTable with a method that sets the widths programmatically. It's a bit of a hack since all the real methods that should do this are private to CellTable and it seems like GWT should provide this