position

Set relative position to an image inside a block in CSS

橙三吉。 提交于 2019-12-12 04:06:22
问题 I have a element inside a block. The block height is 500px and the width is 100% of the screen. In this configuration, i'm aware i can see 500px of the original height (because of the overflow:hidden property i set in my css file). The image has the following css : position: absolute; top: 0; left: 0; How can set 100% in my top property to view the bottom of the image without JavaScript ? I'm sorry for my english. This is a image to help you to understand : I need to know if there is a way to

A CSS table in one of parallel divs

跟風遠走 提交于 2019-12-12 04:05:41
问题 On a webpage I have a container div and inside it two divs next to each other. In the first inner div I am trying to set up a CSS table that has 4 columns that evenly fill the div. The problem I am having is that the cells seem to get their width relative to the page's width, not the table/it's parent div. If I decrease the width from 25% to something lower, it will fit, but if I scale the page, they will still wrap, as the div on the right hits the rightmost table cell. How should I setup

One block should overlap the two adjacent CSS

匆匆过客 提交于 2019-12-12 03:47:27
问题 I need "div2" to overlap/cover its two adjacent block. I can do it with "div1", but I cannot do it with "div3". Someone know how to do it? Please see my code below with what I have a problem. Thanks! HTML: <div class="parent"> <div class="child_1">Some div1</div> <div class="child_2">Some div2</div> <div class="child_3">Some div3</div> </div> CSS: .parent { position: relative; font-size: 34px; border: 1px solid #000; background: #eef; height: 110px; width: 620px; margin: 20px } .child_1 {

Responsive vertical center elements inside div

心已入冬 提交于 2019-12-12 03:46:06
问题 I need to verticaly align elements inside div container. Elements looks like on image below. With this code, I was able to nicely overwrap big picture on the left, but text and small picture still doing what it wants. I need to avoid flexbox, since I need to support also IE8, or atleast IE9. I've been trought several solutions, also with tables or absolute positions, but propably I've always did something wrong... Thank you for helping me get of this :) HTML <section class="contact"> <div

Absolute positioned, width by floated children, won't exceed its own parent

让人想犯罪 __ 提交于 2019-12-12 03:45:16
问题 Okay, so this is a bit difficult to explain. Basically, I have a div positioned relative, holding a an absolutely positioned div. The absolutely positioned div contains divs with a fixed width, which are floated. These floated divs should expand the width of the absolute parent. <div id="parent"> <div id="stretchable-div"> <div class="child">text</div> <div class="child">another text</div> <div class="child">more text</div> </div> </div> Problem being, this does not work when the original

Creating a python Rectangle object class that can print the corner coordinates

假装没事ソ 提交于 2019-12-12 03:28:09
问题 I am new to python. I need to create a python Rectangle object class that when called upon one can print the coordinates of the corners as well as have the area and perimeter. I am having issues when I try to run my code that says: <__main__.Rectangle instance at 0x02F20030> I was told to add the __str__ as well but then I get: TypeError: __str__ returned non-string (type int) Any help would be appreciated, thanks! class Rectangle: def __init__(self, topLeft, topRight, bottomLeft, bottomRight

Android. How to move the imageview(set position/margin) when it is created

假如想象 提交于 2019-12-12 03:08:29
问题 I want to put some images in an area at the application start. As the number of images is not a fixed amount, so I have to create images dynamically. I want to set the position/margin of every images while they're created for good balance. I have tried follows, but there is no efficacy. ・After Created, use imageview.layout(). ・Use LayoutParams.margins(). ・Use AsyncTask to set margins. ・activity.runOnUiThread(). This is the code: // After access server, if needed then add a imageview to the 'c

move image with jquery

馋奶兔 提交于 2019-12-12 03:03:08
问题 For school i'm making a website for a mobile. There are multiple columns, 1 for menu for example, 1 for the context of the book and the one next to that will hold footnotes and image information. On the phone you will only see one column at the time, gyroscope gestures will be used to scroll vertically to the next column. I only can't get the image moving. So if someone could help with that. What important is is that there should form a empty space in the text of once where the image was.

CSS submenu positioning

若如初见. 提交于 2019-12-12 02:48:34
问题 is it possible to keep the position of the 2nd level billboard fixed to the top as opposed to moving down the page on hover? Code HTML <ul id="nav"> <li><a href="#">STUFF</a> <ul> <li><a href="#">STUFF</a> <ul> <li> <div><a href="#">LINK LINK ></a></div> </li> </ul> </li> <li><a href="#">STUFF</a> <ul> <li> <div><a href="#">LINK LINK ></a></div> </li> </ul> </li> <li><a href="#">STUFF</a> <ul> <li> <div><a href="#">LINK LINK ></a></div> </li> </ul> </li> <li><a href="#">STUFF</a> <ul> <li>

jQuery .position() can I get the calc() value instead of the px value?

心不动则不痛 提交于 2019-12-12 02:27:46
问题 I have a button that resizes a div from 200px - 290px In this div elements exist that are positioned using calc(50% - 25px); 25px = half width of child - so they are positioned centrally. I'm using jQuery's ui.swappable to swap elements, but the issue you is they seem to take on their calculated value permanently once swapped pre-swap left:calc(50% - 25px); post-swap left:74px Is there a way to swapping the calc(50% - 25px); instead of the value post calc? $(this).position() 回答1: Solved this.