What is the most effective method for positioning a PNG image file to the bottom left corner?

When trying to add this image to the bottom left, it appears underneath the header. Any tips on how to fix this alignment issue?

https://i.sstatic.net/bQsim.jpg < How the website normally looks

https://i.sstatic.net/IN5z1.jpg < When I add the image code

Jsfiddle

https://jsfiddle.net/fecr9w0t/#&togetherjs=ODnAazMkx8

HTML

<!DOCTYPE html>
<html>
       <head>
       <title> Home - A.Willi A.G</title>
       <link rel="stylesheet" href="index.css" type="text/css" />
       </head>
       <body>

       <h1 align="center">
       <a href="index.html"><img src="logo.png" alt="A.Willi A.G" /></a>
       </h1>

       <div class="menu_div">
       <ul>
       <li><a href="index.html">Home</a></li> 
       <li class="dropdown">
       <a href="#" class="dropbtn">Bewerber</a>
       <div class="dropdown-content">
       <a href="#">Info</a>
       <a href="#">Jobs</a>
       </div>
       </li>

       <li class="dropdown"><a href="#" class="dropbtn">Kunde</a>
       <div class="dropdown-content">
       <a href="personalverleih.html">Personalverleih</a>
       <a href="toolrental.html">Werkzeuge Mieten</a>
       <a href="referenzen.html">Referenzen</a>
       <a href="quali.html">Qulität, Sicherheit und Weiterbildung</a>
       </div>
       </li>
       <li><a href="kontakt.html">Kontakt</a></li>
       </ul>
       </div>

       <div class="fadein"> 
       <img src="welder1.png">
       <img src="welder2.png">
       <img src="welder3.png"> 
       </div>
       <div class="fadein img">
       </div>




       <img src="swissstaffing_sqs_logo_cmyk.png" alt="Swiss Staffing" >




</body>       
</html>

CSS

body { font-family: verdana; background:white ; color: white; }

.menu_div{background-color: #333; width:100%;}
ul {
    list-style-type: none;
    margin: 0 auto;
    display:table;
    padding: 0;
    z-index: 100;
    overflow: hidden;
}

li {
    float: left;
}

li a, .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

li a:hover, .dropdown:hover .dropbtn {
    background-color: black;
}

li.dropdown {
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

        @keyframes fade {
        0%   { opacity: 0; }
        11.11%   { opacity: 1; }
        33.33%  { opacity: 1; }
        44.44%  { opacity: 0; }
        100% { opacity: 0; }
}

    .fadein { position:absolute; height:102px; width:50px; outline: 1px solid blue; }
    .fadein img { position:absolute; left:0; right:0; opacity:0; animation-name: fade; animation-duration: 9s; animation-iteration-count: infinite; }
    .fadein img:nth-child(1) { animation-delay: 0s;  }
    .fadein img:nth-child(2) { animation-delay: 3s;  }
    .fadein img:nth-child(3) { animation-delay: 6s;  }

.menu_div { 
  position: relative;
  z-index: 0;
  border: dashed;
  height: 2.9em;
  margin-bottom: 0em;
  margin-top: 0em;
  z-index:1000;


}
.fadein { 
  position: relative;
  z-index: 3; 
  background: ;
  width: 100%;
  left: 1px;
  top: 0em;

  }

.fadein img{
    margin:0 auto;
    width: 100%;
    max-width: 4060px;
    min-width: 900px;
    max-height: 500%;
}

Javascipt

$("#slideshow > div:gt(0)").hide();

setInterval(function() {
  $('#slideshow > div:first')
    .fadeOut(1000)
    .next()
    .fadeIn(1000)
    .end()
    .appendTo('#slideshow');
}, 3000);

Below is the code I am trying to fix

<img src="swissstaffing_sqs_logo_cmyk.png" alt="Swiss Staffing" >

I have tried using the code below but it didnt work when trying to align it

.container {
    position: relative;
}

.bottomright {
    position: absolute;
    bottom: 8px;
    right: 16px;
    font-size: 18px;
}

img { 
    width: 100%;
    height: auto;
    opacity: 0.3;
}
</style>
</head>
<body>

<h2>Image Text</h2>
<p>Add some text to an image in the bottom right corner:</p>

<div class="container">
  <img src="trolltunga.jpg" alt="Norway" width="1000" height="300">
  <div class="bottomright">Bottom Right</div>
</div>

Answer №1

To ensure that an image always appears in a specific location on the page, you can set its position to "absolute" and specify values for "bottom:0;" and "left:0". This will effectively address any positioning issues you may encounter.

If you want the image to be positioned absolutely within a container, make sure to assign a "position:relative" property to the parent container.

I hope this explanation proves helpful! :)

Answer №2

Was able to resolve the issue by including

   <img src="swissstaffing_sqs_logo_cmyk.png" height=80 style="position:fixed;bottom:0px;left:0px;z-index:999" />

Thanks for the assistance everyone!

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

"Converting a standard grammar with recursion and alternations into a regular expression: A step-by-step

A grammar is considered regular if it follows either a right-linear or left-linear pattern. According to this tutorial, this type of grammar possesses a unique property: Regular grammars have a special characteristic: through the substitution of every no ...

Filtering data with AngularJS upon user clicks

Encountering a perplexing issue at the moment. I have created buttons using ng-repeat and my intention is for them to filter my list when clicked on. However, I am facing an issue where the list fails to filter upon clicking. Here are the buttons: <div ...

Ensuring that the bootstrap5 column extends all the way to the footer

Looking to display a specific email address mailbox for a project. The goal is to have the 'Mail Card List' scrollable instead of extending beyond the page. Tried using 'max-height:;' CSS, but it sets a fixed height. Seeking a variable ...

Manipulate Nested Objects using an Array of Keys

Currently, I am developing a recursive form using React and MUI that is based on a nested object. Throughout this process, it is crucial for me to keep track of the previous keys as I traverse through the recursion. As users interact with the form and mak ...

The mat-table fails to populate with data retrieved from the rest service

I have successfully fetched an array from my REST service and displayed some information from the response on the page. However, I am facing issues populating my mat-table and I'm unsure of the cause. The mat-table was functioning properly in the past ...

The text color remains the same even after the method has returned a value

I have a vuex query that returns a list of books. I want to display each book with a specific color based on its status. I tried using a method to determine the color name for each book and bind it to the v-icon, but it's not working as expected - no ...

Error: Unable to simplify version range

Attempting to follow the Express beginner's guide. I created an app and executed npm install as per the provided instructions. > npx express-generator --view=pug myapp > npm install npm ERR! semver.simplifyRange is not a function npm ERR! A com ...

Print out the error message: "ERROR [ExceptionsHandler] Unable to access the property 'log' as it is undefined."

Just starting out with Nestjs and JavaScript but ran into an error when trying to print a text line using console.log() const my_text ="123" console.log(my_text) https://i.sstatic.net/xPnzX.png ...

Retrieve pixel information upon touch in an Appcelerator Titanium application on Android or iPhone

Can pixel level data of an image view be accessed using Titanium Mobile on Android/iPhone? ...

How can errors for assets on a Vue build be disregarded?

In the process of developing a Vue project that involves static files, I have configured the following in my package.json for local serving: { ... "eslintConfig": { ... "ignorePatterns": [ "**/vendor/*.js" ...

What exactly is the significance of the </< in THREE.Camera.prototype.lookAt</<()?

After experimenting with THREE.js for a while, I came across something peculiar: When using Firefox and opening the developer console to type camera.lookAt (assuming your camera is named camera), it displays function THREE.Camera.prototype.lookAt</< ...

Receiving information within an Angular Component (Profile page)

I am currently developing a MEAN Stack application and have successfully implemented authentication and authorization using jWt. Everything is working smoothly, but I am encountering an issue with retrieving user data in the Profile page component. Here ar ...

The way Firefox interprets em values is incorrect

Currently, I am working on an adaptive website where I have used em values for everything. However, I am facing discrepancies between Chrome and Firefox when it comes to interpreting em values. The website can be found at dev.morodeer.ru/stroymoidom and ...

preventing the page from scrolling whenever I update my Angular view

Whenever I update a part of my model that is connected to my view, my page automatically scrolls. I suspect that the page scrolling is triggered by the view updates. How can I stop this from happening? For instance, here is an example involving a dropdown ...

Looking for assistance with iterating through various layers of nested arrays on a map

Feeling completely stumped after exhausting all my options, I've finally reached out for help. I just can't figure it out... My blog posts are structured like this: const posts = [ { section: 'one', title: [ 'third', &apo ...

Automated task scheduled to execute every minute between the hours of 8am and 4.30pm using Cloudwatch Events

I am facing an issue with my working CRON schedule. It currently runs from 8am to 5pm and I need to change it to end at 4:30pm. Is it possible to set a specific half-hour time interval in CRON? Below is the current setting for my CRON: 0/1 8-17 ? * MON- ...

Tips for showing just one table data cell (<td>) with identical class:

I'm facing a challenge with jQuery, HTML, and CSS. I'm currently in the process of designing a website for a railway company. The Home page is completed, but I've hit a roadblock on the tickets page. Using just HTML, CSS, and jQuery to build ...

Issues arise with AJAX post

I have run into an issue with my jQuery and Codeigniter setup while trying to update the database via AJAX. Despite having the following code in place, nothing seems to be happening or getting sent to my controller when the button is clicked... Snippet of ...

Customized style sheets created from JSON data for individual elements

One of the elements in the API requires dynamic rendering, and its style is provided as follows: "elementStyle": { "Width": "100", "Height": "100", "ThemeSize": "M", "TopMargin": "0", " ...

Error alert: Controllers and services within the same module are experiencing injection issues

I'm in the process of creating an angular module that contains controllers and a service all within the same module. The issue I'm facing is an unknown provider error Error: $injector:unpr. I have made sure not to redefine the module multiple tim ...