Using CSS to layer one element on top of another element

Check out this website at

There seems to be an issue with the image being cut off.

I am looking to have the content in div contentTextWill overlap the rightSideBar. Is this achievable?

Below is the code snippet:

<div class="contentWrapper">
<div class="leftSideBar">
<img class="img-side top" src="images/leftSideTop.jpg" width="169" height="90" border="0" />
<img class="img-side bottom" src="images/leftSideBottom.jpg" width="169" height="90" border="0" />
</div><!--leftSideBar-->

<div class="content" id="content">
<div class="topContent">

<div class="contentTextWill">
</div><!--- This Div should overlay... --->

<div class="bottomContent">
</div><!--bottomContent-->
</div><!--content-->

<div class="rightSideBar">
<img class="img-side top" src="images/rightSideTop.jpg" width="169" height="90" border="0" />
<img class="img-side bottom" src="images/rightSideBottom.jpg" width="169" height="90" border="0" />
</div><!--rightSideBar--> <!--- Overlapping this div --->

</div><!--contentWrapper-->

Answer №1

Repositioning the .rightSideBar above the .content within the DOM:

<div class="contentWrapper">
<div class="leftSideBar">
<img class="img-side top" src="images/leftSideTop.jpg" width="169" height="90" border="0" />
<img class="img-side bottom" src="images/leftSideBottom.jpg" width="169" height="90" border="0" />
</div><!--leftSideBar-->

<div class="rightSideBar">
<img class="img-side top" src="images/rightSideTop.jpg" width="169" height="90" border="0" />
<img class="img-side bottom" src="images/rightSideBottom.jpg" width="169" height="90" border="0" />
</div><!--rightSideBar--> <!--- After this step, not anymore below --->

<div class="content" id="content">
<div class="topContent">

<div class="contentTextWill">
</div><!--- Move this Div over... --->

<div class="bottomContent">
</div><!--bottomContent-->
</div><!--content-->

</div><!--contentWrapper-->

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

Combining Django Bootstrap input-group-addon with Model Form for seamless field integration

Currently, I am displaying my Django form in the following manner: <form action="/student/" method="post"> {% csrf_token %} {% bootstrap_form form %} <input type="submit" value="Launch" class="btn btn-primary"/> </form> I ha ...

jQuery Draggable Slider Scale

Seeking a draggable ruler (meaning it scrolls on double click) similar to the one showcased in the following link: I would greatly appreciate any assistance in finding a library that can provide this same functionality. View image here: https://i.sstatic ...

Compatibility Issue between Jquery UI CheckBox Button and Click Function in IE8

Situation: After calling addButton() function in jQuery, the checkbox element is successfully turning into a button. However, the click event that should trigger an alert message is not functioning. This issue seems to be specific to IE-8 compatibility. ...

Alternative content can be pasted into the webpage

After finding out a peculiar phenomenon related to copy and paste, I decided to share it. If you head over to the Diablo 3 website () and scroll down to the bottom of the page, you will notice: ©2012 Blizzard Entertainment, Inc. All rights reserved A ...

After applying the rotateY function, the z-index appears to be malfunctioning

My current project involves creating a page flip effect, which requires two overlapping div elements. Initially, both divs are side by side with the second div having a -webkit-translateY(180deg) property applied to it. The first div has a z-index of 2, wh ...

Tips on storing the amount of time a user devotes to answering questions on my form into a database

I am facing an issue with storing the "duration" in my database. The "duration" I aim to store is the time spent by the user answering a question I created. When they click the submit button, I want to save the duration they spent in the database. Below i ...

Tips for revealing a hidden button on a modal following a successful AJAX request

I've been attempting to reveal a hidden button after a successful ajax call, but I haven't had any luck so far. Any assistance would be greatly appreciated. Thank you for your time. $.ajax({ url: URL, type: 'GET', ...

Tips for aligning the button and search bar in the center:In order

Currently still learning HTML, I'm facing an issue with centering a button and a search bar that are positioned beside each other. Despite trying multiple methods, I haven't been successful in achieving the desired centered layout while keeping t ...

Change wiki text into HTML using Python for showcasing on a webpage

Despite trying various tools for 6 hours, I have been unable to find one that can properly interpret wikitext like the example below: '<center>Welcome to the world's foremost open content<br><big><big><big>'&ap ...

JQuery causes Bootstrap carousel to malfunction after dynamically adding attribute to img tag

If you're thinking of sending me to this resource: Bootstrap Carousel not working after adding items dynamically with jQuery, know that the situation described there is different from mine. My issue involves fetching paths for 3 images from a JavaScr ...

Tips for modifying button styles with CSS

I am facing an issue with a submit button on my form. The button currently has an image, which is unnecessary as the same image is used elsewhere on the page. I believe there might be a parent-child element problem preventing me from making the necessary c ...

The relationship between a CSS parent and child elements

Currently, I have successfully included my form within <ul><li> tags, functioning well with label and form elements. The CSS code for the form is straightforward and requires no explanation: #form ul {....} #form ul li {....} Now, my dilemma ...

I'm having trouble getting rid of this stubborn loader on the website

I am currently utilizing the following template: . My objective is to eliminate the preloader progress bar that displays the loading progress of the page in percentage. The files associated with this preloader are as follows: Loader CSS File - www[dot]the ...

Guide to making a vertical clickable separator/line using bootstrap

Seeking advice on creating a layout where the left side consists of a sidebar menu occupying 24% and the right side contains main content taking up 75%, with a clickable vertical divider at 1% between them. When this line is clicked, the left part will hid ...

Customizing the font style on a CSS changing table

Below is the CSS code snippet I am using: table.Table12 { border:1px solid blue; } table.Table12 td { border:1px solid blue; width:200px;} table.Table12 a:link { font-weight: bold;} Additionally, here is the HTML code: <table class="Table12" align="r ...

What causes the element with position: fixed and width 100% to exceed the viewport boundaries on iOS 8?

I'm facing an issue with an element that is fixed to the top of the page and scrolls horizontally along with the page. The CSS code for this element is quite straightforward: .thing { position: fixed; top: 0; width: 100%; height: 30px; back ...

When I tried using the HTML 5 boilerplate extension in VS code, I received an error message indicating that it was not functioning properly

I've recently entered the realm of tech and decided to give VS Code a try. After downloading it, I installed several extensions, but unfortunately some of them aren't functioning properly. My primary issue is with the HTML5 boilerplate extension. ...

Guide to verifying a field's value in a database

My web application requires three inputs from the user: UserName, FirstName, and Email. The goal is to verify if the entered username exists in the database and if so, validate the corresponding Firstname and email. If all three values are correct, a succ ...

Steps to creating an elliptical border using CSS

Is there a way to apply CSS styles specifically to the left border of a div to achieve an elliptical shape, while keeping other borders normal? I've managed to create a semi-ellipse with the following code, but the rest of the border remains unchanged ...

Unusual positioning of submenus in CSS menus

I'm facing an issue with my menu where the last item "Apps" is supposed to stay in place instead of sliding down. I'm looking for a CSS-only solution to solve this problem. Here is my current CSS code: div.menu{ display: block; float: left; wi ...