Alignment settings for images contained within a relative div do not function properly

The alignment command I used with a percentage value% (left:10%, bottom: 20%;) for an image within a position:relative div is not responding. Is there a solution to fix this issue? It's worth noting that the images are contained in a div set at 50%

You can view the jsfiddle here.

Thank you in advance!

HTML

<!-- -- -- LEFT SIDE -- -- -->
<aside class="half left">

        <section class="reform" style="right: 0; top: 30px;">
            <img width="200px" src="http://reform.lt/data/images/2013/01/tumblr-mggblgyswc1qabyt1o1-500.jpg" alt="Selected Image" title="Image Title" />
            <span class="caption label"><span class="parenthesis">(</span>TOP working<span class="parenthesis">)</span></span>
            <span class="caption">
                <p>SETTING</p>
                <p> right: 0; top: 30px; </p>
            </span>
        </section>

        <section class="reform" style="left: 50px; bottom: 30px;">
            <img width="300px" src="http://images.tate.org.uk/sites/default/files/styles/grid-normal-8-cols/public/images/markg_gerhardr_nicks.jpg?itok=D7g05qpV" alt="Selected Image" title="Image Title" /> 
            <span class="caption label"><span class="parenthesis">(</span>BOTTOM not working<span class="parenthesis">)</span></span>
            <span class="caption">
                <p>SETTING</p>
                <p> left: 50px; bottom: 30px; </p>
            </span>
        </section>

</aside>

<!-- RIGHT SIDE -->
<aside class="half right">

    <section class="reform" style="right: 10%; top: 40%;">
        <img width="300px" src="http://reform.lt/data/images/2014/09/d4991784x.jpg" alt="Selected Image" title="Image Title" /> 
        <span class="caption label"><span class="parenthesis">(</span>PERCENTAGE not working<span class="parenthesis">)</span></span>
        <span class="caption">
            <p>SETTING</p>
            <p> right: 10%; top: 40%; </p>
        </span>
    </section>

</aside>

CSS

    /* PRIMARY */

aside.half {
    position: relative;
    width: 50%;
    height: 100%;
    }

aside.half.left {
    float: left;
    background: #dbdbdb;
    }

aside.half.right {
    float: right;
    background: #b2b2b2;
    }

section.reform {
    display: block;
    position: absolute;
    text-align: center;
    }

section.reform img {
    filter: grayscale(1);
    -webkit-filter: grayscale(1) brightness(0.9);
    -moz-filter: grayscale(1) brightness(0.9);
    -o-filter: grayscale(1) brightness(0.9);
    -ms-filter: grayscale(1) brightness(0.9);
    -webkit-transition: all 0.3s ease-out;
    -moz-transition: all 0.3s ease-out;
    -o-transition: all 0.3s ease-out;
    -ms-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
    cursor: pointer;
    max-width: 100%;
    height: auto;
    }

section.reform:hover img {
    filter: grayscale(0.1) brightness(1);
    -webkit-filter: grayscale(0.1) brightness(1);
    -moz-filter: grayscale(0.1) brightness(1);
    -o-filter: grayscale(0.1) brightness(1);
    -ms-filter: grayscale(0.1) brightness(1);
    }

section.reform span.caption {
    display: none;
    position: absolute;
    text-align: center;
    padding-top: 25px;
    width: 100%;
    height: auto;
    }

section.reform:hover span.caption {
    display: block;
    }

section.reform span.caption p {
    font: 11px/15px 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #4d4d4d;
    margin: 0;
    padding: 0;
    }

section.reform span.caption p + p {
    color: #999999;
    }

section.reform span.caption.label {
    display: block;
    font-size: 23px;
    font-family:'Phenotype S', times;
    }

section.reform:hover span.caption.label {
    display: none;
    }

.parenthesis {
    font: 19px/0 'American Typewriter', 'Andale Mono', Courier New, Courier;
    font-weight: 100;
    display: inline-block;
    vertical-align: 2.9px;
    padding: 0 5px 0 7px;
    }


/* SECONDARY */

html {
    margin: 0;
    padding: 0;
    }
body {
    width: 100%;
    height: 100%;
    font: 100%;
    color: #212121;
    }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble with GLB file loading in three.js?

My GLB file is not displaying in my Three.js world. Despite following all the documentation and tutorials, the model is not showing up. The world loads perfectly and everything works fine, except for the model not appearing. I am on a journey to create a ...

After submitting, the request does not contain the input type=file field

I'm experiencing an issue with saving a form using Django ModelForm. Everything seems to be working correctly and the values for each field are being populated when I inspect elements and check network -> headers. However, I am not seeing any indic ...

Choosing collections of information and establishing their positions

Trying to determine whether a team is home or away based on a coding logic where 'home' = 1 and 'away' = 0. The code successfully selects two teams from each game, but encounters confusion in identifying the home and away teams after th ...

Styling with CSS in Play Framework version 2.0.3

Running into issues when using CSS in Play Framework 2.0.3 and could really use some help spotting where I'm going wrong. My view, called siteview.scala.html, is defined as: @(name: String, records: List[Record]) @import helper._ @main(name) { < ...

The issue with Ajax.BeginForm OnSuccess is that it prevents the CSS transition from functioning properly

Apologies if the title is unclear. In my design, I aim to implement a transition effect when the left or right buttons are clicked. However, the transition does not function as expected because the OnSuccess callback seems to occur before the page is rend ...

Tips for positioning an advertisement at the center of a full-screen HTML5 game

I am struggling to find a way to perfectly center my advertisement in a fullscreen HTML5 game. The game automatically expands to fullscreen when played, and I want the advertisement to always be positioned in the center, regardless of whether the game is b ...

How can HTML be added in CodeBehind using C# in a WebForm?

I have a method that generates tools based on the number value inserted, and I also have another control called "DateTimePicker" that provides a textbox and date+time picker function. However, the issue arises when I call the dynamic_tools method and inse ...

Using Angular components to manipulate the CSS in the DOM

Struggling with dom manipulation in an angular/node.js environment using typescript for my visualcomponent.html The second inline styling works fine, showing the h1 in blue color. However, I run into issues when trying to embed strings within the innerHTM ...

Clicking on an image with the href=# attribute will smoothly scroll to the top of the

Here is the code snippet I am currently using on my website. Each image link is configured to switch to the next image upon click, but there is an issue where the page returns to the top when the image is clicked. I am looking for a solution to prevent thi ...

The issue with jquery slideToggle is that it mistakenly opens all divs instead of just the specific div that should

My website has a dynamic page with a variable number of <div> elements. The concept is that users can click on the + symbol, which is represented by an <img> tag, to display the corresponding div. Currently, my code includes: PHP/HTML $plus ...

Having difficulty accessing the selected input value from window.localstorage

<script> (function(window, document, undefined) { function saveFormData(event) { if(event.target.type=='checkbox' || event.target.type=='radio') { window.localStorage.setItem(event.target.id, event.target. ...

How can I show the configuration in Laravel?

After updating my pages to utilize an extended header for consistent content across all pages, I encountered an issue with the footer configuration. Whenever I attempt to retrieve a configuration from Laravel, it appears as normal text instead of being pro ...

execute action once element has finished loading - angular

I am looking for a way to trigger an angular function after a specific element has been displayed on the page. The challenge arises because this element is part of a Single Page Application (SPA) where its display is controlled by a series of events. Tradi ...

Determine Checkout Total with Laravel 5.2 Based on Radio Button Selections

Currently, I am developing an e-commerce platform using Laravel 5.2. At the moment, I am able to add products to my shopping cart, which is stored in a session. Once I am ready to proceed, I can view my shopping cart and upon confirmation, I am directed t ...

Using Jquery to compare a user input with values in an array

Utilizing an ajax call in jQuery, I successfully retrieve a JSON file and access its values. However, the next step is to extract a value from the object array and compare it with an input source. If the comparison returns true, then display it within a sp ...

Loading a specific CSS file along with an HTML document

Creating a responsive website, I'm looking to incorporate a feature that allows for switching between a mobile version and a standard desktop version similar to what Wikipedia does. To achieve this, I would need to reload the current HTML file but en ...

Ways to retain a variable's value beyond the scope of a loop in PHP

<?php //establishing connection with the database define('DB_HOST', 'localhost'); define('DB_NAME', 'visitor_list'); define('DB_USER','root'); define('DB_PASSWORD',''); ...

Interactive pop-up window featuring conversational chat boxes

Trying to create a comment box within a Modal dialog box that is half of the width. The comments in this box should be read-only and created using div tags. Attempted reducing the width and using col-xs-6, but ending up with columns spanning the entire w ...

Creating an animated background slide presentation

After creating a button group, I wanted the background of the previous or next button to move/slide to the selected one when the user clicks on it. I achieved this effect using pure CSS and simply adding or removing the 'active' class with jQuery ...

Having Trouble Choosing Options From Dropdown Menu Using Index in Selenium with Java

I am familiar with how to choose an element from a dropdown using the selectByIndex method. However, when attempting to use selectByIndex (select.selectByIndex(index)) on the HTML snippet below: <select id="destinationAllocationId" name="destinationAll ...