How to set horizontally scrolled view childs width? - android-linearlayout

How do I achieve effect that on any screen there are always visible 3,5 eqally wide elements that are childs of a HorizontalScrollView?

please find the solution as below mentiond link:
https://developer.android.com/reference/android/widget/HorizontalScrollView.html

Related

CSS: grid item grows and overflows

my goal is that while hovering any grid item it should change it's height without changing the grid order. Thanks in advance.
Current code:
https://codesandbox.io/s/3x6-grid-that-overflows-on-hover-svu9v6
Current:
Expected:
Here is a not perfect solution https://codesandbox.io/s/3x6-grid-that-overflows-on-hover-forked-to5hsj?file=/src/styles.css
Basically, I added inner divs to the child divs and extended their height on hover.

Overlap 3 images and center them in fluid container

I need to overlap 3 images and center them within a twitter bootstrap row-fluid div. Here is an example of what it should look like:
The solution can use javascript but I'd prefer if it didn't. Also, when the browser is resized the images should remain in the center of Div 1. Anyone have any idea how to do this?
Overlaping:
http://css-tricks.com/almanac/properties/z/z-index/
To center them, use margin-left and margin-right:auto, as long as the parent has a fixed width.

How to push a div from the top in percentage with css?

I'm trying to make a div inside another div to be placed 70% from the top of the parent div so no matter what the screen size is the inner div should flow up or down to adjust for it (kind of like fluid layouts but vertically). I tried doing the following:
http://jsfiddle.net/uxaVe/
But the padding-top is fixed even though I have it set in percentage, I must be doing something wrong but I'm not sure what it is, could you guys help me out? Thanks in advance!
Remove the padding, and replace with
position:absolute;
top:70%;

Expand div horizontally using css

I am looking to expand a div horizontally after a video is dynamically resized, similar to how YouTube works on re-sizing.
I have re-sizing images on the video and they work fine, users can press the + or - arrow fine and the video resizes, but the box on the right does not fall below it and expand the 100% of 1024px container (the max the video resizes). Also, when the video is reduced in size the box does not expand to the left.
Can anyone help me on this?
Please take a look at my jsFiddle as an example http://jsfiddle.net/headex/Xw8EV/ (NOTE: The images for the resizing buttons are not in the fiddle, you just have to imagine they are there)
Any help is much appreciated.
Cheers!
Try to use diplay: inline-block for container element. In that case you do not have to define the width for it and it will have the size of inner element.

Overlapping content and elastic width issues CSS

I'm sort of new at Web Design, I'm getting there, though. But I'm still having trouble with elastic layouts and floats. I think that's where my problem with this page lies but I'm too inexperienced to understand it.
Here's my problems illustrated:
https://img.skitch.com/20120327-nwrm3t1u8cwppnwnegw8f2q7st.jpg
Here's a fiddle with my code:
http://jsfiddle.net/C3Dw2/1/
This is what it SHOULD look like:
http://img.photobucket.com/albums/v410/justice4all_quiet/register_13.jpg
I also want to have the right scrolling section fit in it's parent div. Right now, it's flowing out of it.
Ugh.
Any help would be awesome.
EDIT
The only issue remaining now is the icons not staying in their parent divs.
http://jsfiddle.net/xehMG/2/
See the fiddle for code and demo:
Fiddle: http://jsfiddle.net/C3Dw2/4
Demo: http://jsfiddle.net/C3Dw2/4/embedded/result/
see screen shot for output:
Set min-height on each of the elements that u've given height and width in percentage.Percentage will be effective only when the resolution is big enf to encompass ur children elements.
If you want to use percentages - note the min-width required for their children and set that min-width for its parent.Also use overflow:hidden|scroll|auto as a fall back to control the overflow of the children out of its parent.

Resources