Note that there are some explanatory texts on larger screens.

plurals
  1. PORelative position in one div for more elements
    primarykey
    data
    text
    <p>I have a table with some data but I want to use one cell for displaying more divs. Each of divs has different exact width and position from the left.</p> <p>I tried it with <code>position:relative</code> but position of each next div depends on the divs on the left and I don't want that I want each div in that cell to be exactly <strong>x</strong> pixels from left of the cell border.</p> <p>I also tried <code>position:absolute</code> but this does go really to the <code>&lt;html&gt;</code> tag as they write here <a href="http://www.w3schools.com/css/css_positioning.asp" rel="nofollow noreferrer">http://www.w3schools.com/css/css_positioning.asp</a>:</p> <blockquote> <p>An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <code>&lt;html&gt;</code></p> </blockquote> <p>Now I'm not sure how to solve my problem.</p> <p><strong>My example:</strong> <a href="http://jsfiddle.net/6wSAJ/465/" rel="nofollow noreferrer">http://jsfiddle.net/6wSAJ/465/</a> </p> <p>(Made from accepted answer from here: <a href="https://stackoverflow.com/questions/14567610/relative-positioning-of-two-divs">Relative positioning of two divs</a>)</p> <p><strong>Edit:</strong> I guess I forgot to mention that I need it to work in <strong>IE8</strong>.</p> <p><strong>Edit 2:</strong> <a href="http://jsfiddle.net/6wSAJ/468/" rel="nofollow noreferrer">http://jsfiddle.net/6wSAJ/468/</a> The problem I was dealing with is that if I set the cell relative it completely ruins my real problem table so I have to make divs with relative position around the divs I want to be positioned absolutely. I didn't do that at first cause I always want to try to style the elements I have and add new ones only if really necessary.</p> <p>Thx for helping.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload