Delete any excess space that is currently covered by an image

While trying to implement a tab menu on my website by following this guide, I encountered an issue. The content box appears to be too long and is overlapping with the image. Can someone advise me on how to remove this extra space?

For reference, you can view an example of the problem in this jsfiddle demo.

HTML:

<div class='product'>
    <div class="product_image">
        <img src="http://www.gamersgate.com/img/boximgs/big/DDB-TTCP.jpg" alt="fggf"
        />
    </div>
    <div class="container">
        <ul class="tabs">
            <li class="tab-link current" data-tab="tab-1">Tab One</li>
            <li class="tab-link" data-tab="tab-2">Tab Two</li>
            <li class="tab-link" data-tab="tab-3">Tab Three</li>
            <li class="tab-link" data-tab="tab-4">Tab Four</li>
        </ul>
        <div id="tab-1" class="tab-content current">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
            quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
            consequat.</div>
        <div id="tab-2" class="tab-content">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
            dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
            proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
        <div
        id="tab-3" class="tab-content">Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
            ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
            in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</div>
    <div
    id="tab-4" class="tab-content">Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
        aliquip ex ea commodo consequat.</div>
</div>
<!-- container -->

CSS:

    body{  
    margin-top: 100px;  
    font-family: 'Trebuchet MS', serif;  
    line-height: 1.6  
     }  
    .container{  
    width: 800px;  
    margin: 0 auto;  
    }  

    ul.tabs{  
    margin: 0px;  
    padding: 0px;  
    list-style: none;  
    }  

    ul.tabs li{  
    background: none;  
    color: #222;  
    display: inline-block;  
    padding: 10px 15px;  
    cursor: pointer;  
    }  

    ul.tabs li.current{  
    background: #ededed;  
    color: #222;  
    }  

    .tab-content{  
    display: none;  
    background: #ededed;  
    padding: 15px;  
    }  

    .tab-content.current{  
    display: inherit;  
    }  

    .product {
    font-size: small;
    }

   .product_image {
   float: left;
   width: 200px;
   padding: 20px;
   margin: 0 20px 20px 0;
   }

Answer №1

As I comprehend, you can verify by clicking on this link

The alterations were made only in the css

Answer №2

Made some updates to the CSS code, check out this Fiddle

.tab-content {  
  display: none;
  float: right;
  width: 584px;
  margin: 0;
  background: #ededed;  
  padding: 15px;  
}  

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

"Implementing Cross-Page Communication in ASP.NET: Triggering UpdatePanel1.Update() method from a Different

I have Default.aspx set up with various controls, including an Uploadify Image upload control. I am calling another file called UploadImages.aspx to handle the image uploading process using jQuery. The images are uploaded using general C# code and the deta ...

When using $state.go in $stateChangeStart, there is a dual state transition in ui-router

Take a look at my Plunker. When you click on the profile link and examine the list of state changes: stateChanges = [ " -> home", "home -> profile", "home -> signIn", "signIn -> signIn" ] You'll notice an unexpected extra state c ...

Increasing numerical section of text with JavaScript

Is there a way to increment the numeric part at the end of a string in JavaScript when certain actions occur? For example: var myString = 'AA11111' increaseStringValue(myString) # Updated value of myString => 'AA11112' Additional ...

The fabulous four of web development: Ajax, PHP, SQL, as well

I have encountered a problem that has left me stumped and unable to find a solution. Although I don't usually ask questions here, any help would be greatly appreciated. Here is the PHP code that handles the Ajax call: <?php session_start(); ...

Capturing a res.send(404) error in ExpressJS during production: Tips and tricks

Can middleware handle errors like 404 and 500 when they are returned this way? exports.index = function(req, res) { res.send(404); } In production, I would want to display a custom missing page for these errors. However, my error handler middleware doe ...

What method can I use to locate the double quote option within an HTML select element using jQuery?

Here is an example of the select: <select id="id0" name="name0"> <option value='30" size'> 30" size </option> </select> The select contains double quotes. I am trying ...

Encountering a "Cannot GET /PATH" error while developing a NUXT application due to a DOT present in

In my nuxt application, I encountered a peculiar issue. When I execute npm run dev, everything functions properly. However, after running npm run build and then npm run start, I face the error message stating cannot GET [path of the page here] I noticed t ...

Losing a specific characteristic of data occurs when assigning a JavaScript object

After dedicating a full day to investigating this case, I found myself losing hope. const Tests = (state = INIT_STATE, action) => { switch (action.type) { case GET_TEST_DETAIL: return { ...state, test: {}, error ...

Is it possible to integrate an html page within a wordpress website?

I'm a WordPress newbie but I have experience with HTML, CSS, JS, and PHP. Can anyone guide me on how to incorporate existing HTML pages into my WordPress site? I recently set up WordPress successfully on my domain hosted by GoDaddy (www.mydomain.com) ...

Ensure that col-6 expands to fill the entire row in the event that the other col-6 is hidden on a

I'm currently working on a project that involves two columns. <div class="col-6"> <p> Here is some text for the paragraph. </p> </div> <div class="col-6 d-none d-sm-block"> <img class="goal-f1 rounded" src=" ...

Discovering the Browser Refresh and Close Events in Angular JS: A Comprehensive Guide

Hello, I've attempted using the event below to detect something, but occasionally it doesn't trigger when closing the tab or browser. $window.addEventListener('beforeunload', function(event) { // Your code here }); ...

When using AngularJS with DateRangePicker, I am encountering an issue where my ng-model does not capture the input text value when I select a date

Trying to establish the selected date range in an ng-model called dateRange in the following HTML. The input text field displays the selected value correctly, but dateRange remains null. What steps can I take to address this issue? <!DOCTYPE html> ...

"Generating a unique, random HEX color using JavaScript from an array

Currently, I am attempting to create a random border color within a div using specific hex codes that have already been determined, but I am encountering some difficulties. Does anyone have any suggestions on how to achieve this? I am still learning JavaS ...

There was an error: process is not defined / Line 0: Parsing error

When starting a basic Create React App project, I typically begin by running npm install. Next, executing npm start will automatically open the default web browser1. Upon pressing F12, two error messages are displayed in the console. https://i.sstatic.net ...

Having trouble loading items in a <select> tag with Jquery?

Dealing with a seemingly simple issue, I am struggling to figure out how to load items into a select using jQuery. Working with the Materialize theme available at: The code snippet in question: <div class="input-field col s12"> <s ...

Struggling to locate __proto__ of the global object known as "window."

Currently I am using Google Chrome browser. console.log(window.__proto__.__proto__.__proto__); console.log(window.__proto__.__proto__.__proto__ === EventTarget.prototype); The first code mentioned above returns EventTarget.prototype for me. This can be ...

Navigating to a precise location on initial page load using Angular 11

Within the structure of my app, I have a parent component that displays a large image from a child component. When the parent component loads, I want the browser window to automatically scroll to a specific position in order to center the image. Currently ...

Having trouble positioning a specific element at the top right of the header navbar in Laravel Bootstrap 5

Is there a way to create a top navbar with the project name and menu on the left, and user management on the right? Currently, both options are aligned to the left. Here is an example of what I have: top navbar This navbar is placed in the header, and her ...

Tips for making a background image responsive using ng-style in AngularJS

Can anyone assist me in fixing the gap space issue in a responsive view with an attached jpg background image? Follow this link for more details: enter image description here ...

Implementing Desktop Alerts for Your Web Platforms without requiring the user to be actively engaged in the application or even logged out of the site

Looking to integrate browser notifications in a ASP.NET MVC Web Application, even when the user is not within the application. Is it possible to achieve this functionality? I have already explored , but need further assistance. If I utilize SignalR for Cl ...