Words piling up one upon the other

I've encountered an issue where the text is stacking on top of itself in Internet Explorer only. Here is the specific CSS for IE:

h2 {
font-family: 'Paytone One', sans-serif;
font-size: 30px;
position: relative !important;
top:-150px !important;
left:-250px !important;
color: black;
}
h3 {
font-family: 'Paytone One', sans-serif;
font-size: 20px;
position: relative !important;
top:150px !important;
left: 100px !important;
}
.image2 {
position: relative !important;
bottom:100px !important;
left: 100px !important;
}
.box1 {
width: 100%;
height: 5px;
background-color:  #FC3B3B;
position: relative !important;
bottom:0px !important;
left: 0px !important;
}
p {
position: relative !important;
bottom:0px !important;
left: 0px !important;
font-size: 15px;
font-family: arial;
color: #585858;
}

I added !important which led to this issue. How can I prevent this from happening while still defining the position?

Here is the HTML part of my page:

  <!DOCTYPE html>
<head>
<link href='http://fonts.googleapis.com/css?family=Paytone+One' rel='stylesheet' type='text/css'>
<title>Louis Moore | Creating The Future  </title>
<!--[if IE]>
<link rel="stylesheet" type"text/css" href="ie.css" >
<![endif]-->

</head>
<style>
.box {
background-color: #F1F2F2;
border: 1.5px #D1D3D4 solid;
position: relative;
top: 100px;
height:450px;
width:100%;
}
.image1 {
position: absolute;
top:-100px;
left: 400px;
}
body{
font-family: 'Paytone One', sans-serif;
font-size: 30px;
}
h1 {
font-family: 'Paytone One', sans-serif;
font-size: 40px;
position: absolute;
top:150px;
left: 400px;
}
h2 {
font-family: 'Paytone One', sans-serif;
font-size: 30px;
position: absolute;
top:200px;
left: 500px;
color: #FC3B3B;
}
h3 {
font-family: 'Paytone One', sans-serif;
font-size: 20px;
position: absolute;
top:300px;
left: 400px;
}
.image2 {
position: absolute;
top:370px;
left: 600px;
}
.box1 {
width: 100%;
height: 5px;
background-color:  #FC3B3B;
position: absolute;
top:560px;
left: 0px;
}
p {
position: absolute;
top:600px;
left: 100px;
font-size: 15px;
font-family: arial;
color: #585858;
}
</style>


<body>
<div class="box">
<img src="louis.png" class="image1" alt="." width="400px" height="400px">
<h1> WELCOME TO MY PAGE<h1> 
<h2>COMING SOON... <h2>
<h3>BUT FOR NOW FOLLOW ME ON TWITTER</h3>
<a href="http://twitter.com/louismoore18"><img src="twitter.png" class="image2" border="0" alt="."></a>
</div>
<div class="box1">

</div>
<p>louismoore.net © All rights reserved 2012</p>
</body>
</html>

Answer №1

    <!DOCTYPE html>
    <head>
    <link href='http://fonts.googleapis.com/css?family=Paytone+One' rel='stylesheet' type='text/css'>
    <title>Eliza King | Designing the World  </title>
    </head>

   <style>
       .clearfix:after {
        content: ".";
        display: block;
        clear: both;
        visibility: hidden;
        line-height: 0;
        height: 0;
    }

    .clearfix {
        display: inline-block;
    }

    html[xmlns] .clearfix {
        display: block;
    }

    * html .clearfix {
        height: 1%;
    }

    .box {
    width:100%;
    }
    .images{
    background-color: #F3F4F5;
    border: 2px #E2E4E5 solid;
    height:500px;
    width:100%;
    }
    .image1 {
    margin:auto;
    display:block;


    }
    body{
    font-family: 'Paytone One', sans-serif;
    font-size: 35px;
    }
    h1 {
    font-family: 'Paytone One', sans-serif;
    font-size: 45px;
    text-align:center;
    padding-top:30px;
    color:#eee;

    }
    h2 {
    font-family: 'Paytone One', sans-serif;
    font-size: 35px;
    text-align:center;
    color:green;
    }
    h3 {
    font-family: 'Paytone One', sans-serif;
    font-size: 25px;
    text-align:center;
    color:green;
    }
    .image2 {

    }
    .box1 {
    width: 100%;
    height: 7px;
    background-color:  #FD4C4C;

    }
    p {

    font-size: 20px;
    font-family: arial;
    color: #686868;
    }

   </style>
    <body>
    <div class="box clearfix">
    <div class="images">
    <img src="artistic.jpg" class="image1" alt="." width="450px" height="450px">
    </div>
    <h1> WELCOME TO MY CREATION</h1> 
    <h2>STAY TUNED FOR UPDATES... </h2>
    <h3>CONNECT WITH ME ON INSTAGRAM</h3>
    <a href="http://instagram.com/elizaking22"><img src="instagram.png" class="image2" border="0" alt="."></a>
    </div>
    <div class="box1 clearfix">

    </div>
    <div class="clearfix">
    <p>elizakingdesigns.net © All rights reserved 2022</p>
    </div>
    </body>
    </html>

    Implement this HTML code,

    And integrate this css code without any additional styling for IE

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

Discovering the magic of Bootstrap 5 and mastering its classes

Currently facing an issue with the me and ms classes while learning to build a navbar. The requirement is for elements one and two to be left-aligned using the ms class, and elements three and four to be right-aligned using the me class. However, the eleme ...

Top tip for combating form misuse in Django applications

Is there a reliable method to restrict form submissions in Django? I need the form to be submitted a maximum of 5 times from the same IP address within one hour. Can this restriction be implemented in Django? I experimented with Django Ratelimit, but unfo ...

The picture is not appearing on the screen. Django

I'm having trouble finding the issue (probably a syntax error). My images are not appearing and instead I see "NO FILES" displayed. html <!-- RECENTLY ADDED FILES --> <div class="buttom-box floatleft"> <h3>R ...

CSS Table columns are set to have a fixed width for the first and last columns, while the middle two columns have dynamic widths

I was able to create a table layout like this: fixed - dynamic(50%) - dynamic(50%) - fixed http://jsfiddle.net/ihtus/ksucU/ Now, I'm wondering how to achieve this layout instead: fixed - dynamic(30%) - dynamic(70%) - fixed This is the CSS code I c ...

Fade between two divs using jQuery works perfectly with images, but unfortunately, it does not work with iframes

Edit: Uploaded live, with images, and with iframes I am experimenting with making pane1 fade into pane2. It successfully works with images, but I am curious if it can be achieved with iframes. Is this feasible? Any insights or suggestions are much appreci ...

What is the best way to center align all elements using a wrapper in CSS grid?

I am working on designing a layout that looks like this: https://i.sstatic.net/jAaXL.jpg I have set the wrapper as a class and aim to center everything on the screen. Aside from the wrapper, I also want to make the text and form equal sizes. Here is th ...

The function Event.preventDefault seems ineffective when attempting to block input of CJK (Korean) characters in a v-text-field of type

Currently, I am tackling an issue in a Vue project where I need to fix a small bug. However, the solution seems quite challenging. I have managed to make the v-text-field accept only numerical input, which is functioning well. <v-text-field type=" ...

I am eager to prevent my division element from shifting position

I have a program that controls the water level in a virtual bottle. By clicking a button, the water level can increase or decrease. However, the program does not automatically stop; it requires manual intervention to stop it. I need to modify it so that wh ...

Issue with HTML5 Canvas y-axis dimensions

I am attempting to create a basic animated HTML canvas with a moving block controlled by WASD keys. I encountered an issue where drawing a 5x5 rectangle appeared to be 5x10 on the canvas. Upon inspecting my code and logging the position of the element, I d ...

WindiCSS classes are not functioning properly within a Nuxt application

I've been encountering some difficulties with WindiCSS. The classes are not being applied to the elements as expected. I attempted to install an older version of Windi, but the issue persisted. I even tried switching to Tailwind instead of Windi, but ...

Creating tilted divs with dynamic height to perfectly fit the content

I'm struggling to incorporate this design into my webpage; I can't seem to get the right div's height to match the left div as depicted in the second image. Can someone offer some assistance? Additionally, when viewed on mobile, the squares ...

`Creating a fluid MySQL table using JavaScript`

One of the challenges I'm facing involves working with a MySQL table that consists of 3 columns: MySQL db table +--+----+-------------+ |id|data|display_order| +--+----+-------------+ |0 |0 |2 | +--+----+-------------+ |1 |1 |1 ...

Exclude a specific tag from a div in JavaScript

I need help selecting the text within an alert in JavaScript, excluding the <a> tag... <div id="addCompaniesModal" > <div class="alertBox costumAlertBox" style="display:inline-block;"> <div class="alert alert-block alert- ...

Adjusting iframe height based on content in ReactJS

When tackling this problem in a React environment, the traditional solution falls short due to the dynamic component structure and event model: script: <script> function resizeIframe(obj) { obj.style.height = obj.contentWindow.document.body.s ...

Using CSS transitions to animate elements with specified opacity values

My goal is to transition buttons from opacity 0 to opacity 1 with a delay, but I am facing an issue. Some of these buttons have the "selected" class which gives them an opacity of 0.35. However, when the transition starts, the buttons with the "selected" c ...

Why is the outline buttons class only displaying gray colors for me?

I'm having trouble with the outline buttons class (btn btn-outline-primary) in Bootstrap. For some reason, all the buttons appear gray instead of colored as they should. Here's an example of how the buttons should look: https://ibb.co/ChKf83y, bu ...

Issue with CSS: Hover effect causing unexpected additional white space

My main goal is to implement a hover effect that covers an entire section, but I'm facing some challenges. When I hover over my products, it doesn't behave as expected and adds extra white space below while not covering the section properly. Thi ...

The left menu icons transform upon mouseover interaction

Is there a way to dynamically change the image displayed in the left menu when hovering over it, similar to the example shown below? https://i.stack.imgur.com/HzGwR.png Currently, the image does not change on hover. We would like it to transition into a ...

Creating an image with Python utilizing an HTML template for later printing

Currently, I'm working on merging or assembling 3, 4, 6, or even more photos into one single file based on a specific template. This file will then be sent to a printer in a photobooth style. I attempted to achieve this using the Pillow library but f ...

Utilize jQuery to showcase elements in a dropdown menu

Hey everyone, I'm working on an ASP.NET MVC4 project and I'm using a jQuery script on the edit page. However, I am encountering an issue with displaying elements on the page. Here is the initial HTML markup of my dropdown before any changes: & ...