layout

Center div horizontally and vertically inside another div

元气小坏坏 提交于 2021-02-16 18:21:07
问题 I have a question regarding centering an element horizontally and vertically inside of another div. I am working on a website for a client, and here is the page that is giving me trouble: http://staging.slackrmedia.com/halfpast/brand_collection_bremont.html So when you hover over an image, you see a link that says "View Collection". I'm styling this using CSS3 transitions and opacity, but I'm having one issue: I need this "View Collection" link to center horizontally and vertically inside of

How to keep an area a constant/relative size while user expands/collapses treeview?

左心房为你撑大大i 提交于 2021-02-11 15:01:38
问题 I have a window that will be a variable size , currently it is 300 x 400 as shown below. In the top part I have an expandable tree view In the bottom part I have a long horizontal panel with a button in it. I want the top area (treeview) to be about 95% of the height, with the button tool area a constant 50 high. I want these proportions to stay constant as the user expands and collapses the tree view (and as it expands below the button toolbar, I want the viewscroller to pop in with a

How to keep an area a constant/relative size while user expands/collapses treeview?

微笑、不失礼 提交于 2021-02-11 14:58:42
问题 I have a window that will be a variable size , currently it is 300 x 400 as shown below. In the top part I have an expandable tree view In the bottom part I have a long horizontal panel with a button in it. I want the top area (treeview) to be about 95% of the height, with the button tool area a constant 50 high. I want these proportions to stay constant as the user expands and collapses the tree view (and as it expands below the button toolbar, I want the viewscroller to pop in with a

How to keep Text as leading alignment after set Text().frame(maxWidth: .infinity)

纵然是瞬间 提交于 2021-02-11 14:45:24
问题 It could be a simple case, but I couldn't find a solution. Here is my code , using the GeometryReader to set the relative layout of SwiftUI view size like Image. The issue in on the last VStack, I want to background of Text to go to the right end of VStack. Thus, I set it as Text("Haibo: asdasd").frame(maxWidth: .infinity) but after that I found the text became to horizontal centered and not followed the VStack alignment: .leading. import SwiftUI struct ContentView: View { var body: some View

Flutter Mixed Layout - Grid with Rows

99封情书 提交于 2021-02-10 19:39:20
问题 I'm trying to create a basic Flutter app that has a a 2 by 2 grid of text inputs & a button below it. Initially, I just had the grid & no buttons with no problems: void main() => runApp(new App()); class App extends StatelessWidget { ... Widget build(BuildContext context) { return new MaterialApp( ... home: new InputWidget() ... class InputWidget extends StatefulWidget { Widget build(BuildContext context) { ... _InputWidgetState createState() => new _InputWidgetState(); ... class

how to distribute items inside recycle-view evenly?

♀尐吖头ヾ 提交于 2021-02-10 18:17:30
问题 i Have recycle view as follow: <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorWhite" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal" android:textAlignment="center" /> <!-- items inside

button needs to fill parent radiobutton

房东的猫 提交于 2021-02-08 15:28:12
问题 I have a radio group with two radiobuttons. each button has a custom selector. I would like for the drawable in the selector to fill out the width of the radio button. Under different resolutions the button looks different. I am not using a nine-patch so this makes sense but even if i was I am not sure how to make the button drawable stretch. Below is the code for the radio group and a selector. widths are different from fiddling around. The layout xml: <RadioButton android:id="@+id/radiomale

How to make jtable on full jframe window

扶醉桌前 提交于 2021-02-08 12:07:18
问题 i am trying to create a jtable using java swing and little bit i am able to do this but problem is this that i want to create that jtable on full jframe window how can i do this here is my code given below import javax.swing.*; import javax.swing.table.*; import java.awt.*; public class ScrollableJTable{ public static void main(String[] args) { new ScrollableJTable(); } public ScrollableJTable(){ JFrame frame = new JFrame("Creating a Scrollable JTable!"); JPanel panel = new JPanel(); String

How to make jtable on full jframe window

非 Y 不嫁゛ 提交于 2021-02-08 12:06:49
问题 i am trying to create a jtable using java swing and little bit i am able to do this but problem is this that i want to create that jtable on full jframe window how can i do this here is my code given below import javax.swing.*; import javax.swing.table.*; import java.awt.*; public class ScrollableJTable{ public static void main(String[] args) { new ScrollableJTable(); } public ScrollableJTable(){ JFrame frame = new JFrame("Creating a Scrollable JTable!"); JPanel panel = new JPanel(); String

ASP.NET Checkbox Text not aligned right or left to the Checkbox

假如想象 提交于 2021-02-08 06:52:24
问题 In the new Visual Studio 2012 Webforms Templates all my ASP.NET Checkboxes and Radiobuttons have the Text on top or on bottom. Is the intended!? How can i align the text right as it always was? I tried disable theming and set the cssclass to checkbox but nothing changed. Solution found : I researched the html in firebug and it seems that the default Microsoft CSS is broken(!) label { display: block; } causes the wrong aligment 回答1: It is styling issue. Maybe the page viewport is too small and