Achieving the placement of three horizontal images side by side on screen

I need to showcase three images side by side without any gaps in between, and each image should have a clickable link on top. Additionally, the layout must be responsive to window size changes. Currently, there are spaces separating the images.

Below is the code I have been working with:

.callout-container {
  position: relative;
  bottom: 480px;
  right: 0px;
}

.callout {
  position: relative;
  float: left;
  Width: 33.3%;
}

.button-1 {
  position: absolute;
  top: 160px;
  right: 1420px;
  color: white;
  background-color: rgb(224, 99, 38);
  padding: 10px;
  padding-left: 100px;
  padding-right: 100px;
  font-family: Futura;
  font-size: 20pt;
  opacity: 0.9;
}

.button-2 {
  position: absolute;
  top: 160px;
  right: 825px;
  color: white;
  background-color: rgb(224, 99, 38);
  padding: 10px;
  padding-left: 100px;
  padding-right: 100px;
  font-family: Futura;
  opacity: 0.9;
  font-size: 20pt;
}

.button-3 {
  position: absolute;
  top: 160px;
  right: 220px;
  color: white;
  background-color: rgb(224, 99, 38);
  padding: 10px;
  padding-left: 100px;
  padding-right: 100px;
  font-family: Futura;
  opacity: 0.9;
  font-size: 20pt;
}
<div class="callout-container">
  <div>
    <div class="callout-one callout">
      <img src="callout_1.png" alt="">
    </div>
    <div class="callout-two callout">
      <img src="callout_2.png" alt="">
    </div>
    <div class="callout-three callout">
      <img src="callout_3.png" alt="">
    </div>
  </div>
  <div>
    <div>
      <a href="" class="button-1" style="text-decoration:none;">
                Property Owner?
            </a>
    </div>
    <div>
      <a href="" class="button-2" style="text-decoration:none;">
                City Visitor?
            </a>
    </div>
    <div>
      <a href="" class="button-3" style="text-decoration:none;"> 
                Teacher?
            </a>
    </div>
  </div>
</div>

Edit: Here's a snapshot of the current display for reference: screenshot

Answer №1

It seems like you want the links to be aligned with the images, am I correct?

I have set up a jsFiddle for testing purposes: https://jsfiddle.net/mp9007/aL27fxm3/

From what I can tell, this is close to what you are looking for:

<div class="callout-container">
   <div>
      <div class="callout-one callout">
          <a href="" class="button-1" style="text-decoration:none;"> Property Owner?</a>
      <!-- image -->
      </div>
   <div class="callout-two callout">
      <a href="" class="button-2" style="text-decoration:none;"> City visitor?</a>
      <!-- image -->
   </div>
   <div class="callout-three callout">
       <a href="" class="button-3" style="text-decoration:none;"> Teacher?</a>
      <!-- image -->
    </div>
 </div>

To achieve this alignment, you'll need to remove the absolute/right alignment from the CSS button class:

.button-3{
   position: absolute;
   top: 160px;
   //right: 220px;
   color: white;
   background-color: rgb(224, 99, 38);
   padding: 10px;
   padding-left: 100px;
   padding-right: 100px;
   font-family: Futura;
   opacity: 0.9;
   font-size: 20pt;
}

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

Tips for centering text in a div element

Check out this fiddle http://jsfiddle.net/QLCeH/ where the text isn't aligning properly with the header "Google" and is ending up below the image. Here's the code from the fiddle: HTML : <div style="margin-left:auto;margin-right:auto; widt ...

What is the best way to incorporate tags into this type of statement?

I'm having trouble getting this code to work {% for student in students %} {{<th>student.Last_name</th>}} {{<th>student.First_name</th>}} {{<th>student.Email</th>}} {{<th>student.Contact</th>}} {{<t ...

Ensure that the text remains in the forefront while applying a scaling effect to the image

My image gallery features a hover effect that utilizes a CSS transform when the user hovers over the images. transform: scale(1.1); Before the hover effect, the image appears like this: https://i.sstatic.net/fiP5e.jpg And with the effect applied, it loo ...

Guide for configuring Quirks mode for Documents in asp.net

Currently, I am using Internet Explorer 10 and I am looking to set the Document mode of the browser to normal Quirks instead of IE 5 quirks for my website. I have tried adding <meta http-equiv="X-UA-Compatible" content="IE=10;IE=9;IE=edge"> in my m ...

Storing raw HTML in a Mysql database, then fetching and displaying it on a webpage

I'm having an issue with my application. It's a form builder that allows users to create their own forms and then save them for later use. The HTML code generated by the form builder is stored in a MySQL database. However, when I try to retrieve ...

Linkage Transformation

Seeking a solution for managing dynamic links. Imagine having a basic link like this: <a href="~/Test/Test.pdf" target="_blank">Test Dynamic Links</a> If there is a button or input that allows users to replace that link with another, how can ...

Switch up the images based on the JSON response that is received

When receiving a JSON response, I am using the item details to populate a menu grid by utilizing an adapter. So far, I have successfully loaded all the item details such as ImageURL, Description, and Price. However, I encounter an issue when loading the is ...

Locating a specific class element within a collection of buttons using JQuery

I am currently working on making two buttons function similar to radio buttons, allowing only one to be selected at a time. HTML <button class="button" value="purchase" name="selector_button_group"> Purchase </button> <button class=" ...

The Bootstrap 4 modal appears to be failing to load properly, as it is only

Trying to trigger a Bootstrap modal with a button click. Currently, there is one functioning modal on the page that works fine. However, when attempting to load another modal on a button click, only a faded screen appears. <button class="btn btn-green ...

Can we make the RegExp shorter?

I am utilizing the following RegEx pattern in a client-side validator for ASP.NET: \d{9}|A\d{8}|a\d{8} This pattern effectively identifies the desired strings, which are: 123456789 a12345678 A12345678 However, I have noticed that there i ...

Stop flex items from displaying horizontally

I'm having an issue with flexbox where I want each item in a block to be on its own row. Specifically, I want the orange square to be positioned above the text, but it's currently displaying beside it due to using flex. Does anyone have a solutio ...

Discrepant functioning of window.location in Internet Explorer versus Chrome

I am encountering an interesting issue with a webpage that has 3 levels in its URL structure, such as example.com/1/2/3. The code snippet I am using is as follows: window.location.replace(""); When running this code in IE11, it navigates to example.com/1 ...

Why does the font-awesome CSS file fail to work while the font-awesome CDN is successful?

I've noticed that when using the font-awesome CSS file, the icons do not display properly. However, when I use the CDN and keep all the code the same, it works perfectly. Can someone explain why this happens? Here is my code: <!DOCTYPE html> < ...

The functionality of cropping is not supported within a Bootstrap modal

I have been using ngimgcrop successfully to crop images within my application. However, I encountered an issue when trying to display the cropped images inside a uibmodal (AngularJS modal). Despite trying various solutions, such as using ng-init, I was una ...

Assigning event to the body element

Is there a way to bind an event to the entire page, specifically the html or body tag? I am trying to achieve the following: document.addEventListener('mousemove', function() { alert('a'); }); I want an alert to be triggered whenever ...

relocate the figcaption below the image on mobile devices

Currently, I am in the process of updating an old website to make it responsive, and I have encountered several challenges along the way. My goal is to have the fig captions displayed on the right side in the desktop version, but underneath the figure in ...

Why do certain list items on my page have a gap between their border and content?

I recently encountered an issue with my list of items and their styling. Each list item contains an anchor element with a gray background, while the item itself has a gradient bottom border. However, I noticed that in some cases, there was a white line ap ...

Guide on extracting text from a tag without a defined identifier?

In the HTML code provided, I need to extract a specific text. If the text was within an href tag, I could easily use get_attribute("text"). However, in this particular code snippet, there is no such tag present. <h2 class="slideable title"> <span ...

"Interacting with a button using jQuery: clicking and moving the

Here is the code I have: <html> <head> <script src="js/jquery.js"></script> <script type="text/javascript> function showMenu() { $('#mm').slideDown("slow"); } $(document).ready(function(){ $('#mm').hide(); ...

AngularJS date and time picker featuring user-defined input validation

Is there an AngularJS component available that offers both a date/time picker and the ability to input dates using the keyboard? ...