Text selection is disabled

During my work on the test website, I encountered an issue. I've included all of my code as I'm unsure where the problem lies. View the jsfiddle here. As shown in the jsfiddle, the top section of text on the website is unselectable. I'm seeking clarification on the source of this problem. Could someone please explain the error?

Here's the HTML code in question:

.button {
  text-decoration: none;
  color: #ffffff;
  background: rgba(143, 152, 191, 0.4);
  color: #999;
  line-height: 3em;
  display: block;
  float: left;
  padding-left: 10px;
  padding-right: 10px;
  font-family: courier new;
  -moz-transition: 1s linear;
  -ms-transition: 1s linear;
  -o-transition: 1s linear;
  -webkit-transition: 1s linear;
  transition: 1s linear;
}
.button2 {
  text-decoration: none;
  color: #ffffff;
  background: rgba(143, 152, 191, 0.4);
  color: #999;
  line-height: 3em;
  display: block;
  float: left;
  padding-left: 10px;
  padding-right: 10px;
  font-family: courier new;
  -moz-transition: 1s linear;
  -ms-transition: 1s linear;
  -o-transition: 1s linear;
  -webkit-transition: 1s linear;
  transition: 1s linear;
}
...
<body background="pictures/spacexwall.jpg">
  <div class="menuu">
    <div class="mainn">
      <a class="button" href="SpaceX.html"> Home </a>
      <a class="button2" href="founder.html"> Founder </a>
      ...
</body>

Answer №1

Dear User,

The height of your <div class='mainn'> element is too large, causing it to obscure the top part of the text and block your selection.

.mainn {
     height: 2em;
     width: 111em;
}

By adjusting the CSS as shown above, you can fix the problem.

You can view the updated jsfiddle here.

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

Steps for ensuring a div component appears on top of any other component (like h1 or p)

The outcome of the code below is displayed in this image: https://i.stack.imgur.com/CPDqC.png Is it possible to make the dropdown overlap on top of the 'HELLO's text, hiding the h1 and p tags? I have tried using z-index without success. Making ...

Attempting to clear out a bootstrap-select element and refill it with new options

I've been attempting to clear all the values in a multiselect selectpicker from bootstrap-select, but unfortunately, no matter what method I try, it doesn't seem to work. I attempted to follow the examples provided for the remove method in the m ...

Error in designing the ReactJS navbar (utilizing internal Bootstrap CSS)

I am facing an issue with the navigation bar in my project. When I use a link to an external source for the navigation bar, it works fine. However, when the internet connection is slow, I notice a brief loading time for the navigation bar which is quite bo ...

Persistent Footer and Internet Explorer Compatibility

I'm facing an issue where my sticky footer doesn't stick to the bottom when there's a floating element in my content. Instead, it sits at the end of the non-floated content. My goal is to have the footer at the bottom of the page window if ...

Instruments for crafting an application compatible with a wide range of web browsers

Currently tackling various browser challenges. I find myself wondering whether it's achievable to create an application that is compatible with all browsers, or at least the majority. Should it be a web application? Any recommendations on frameworks a ...

Attempting to modify the background hue of a grid component when a click event is triggered

I am struggling with the syntax to change the color of an element in my grid when clicked. I have attempted different variations without success. Being new to JavaScript, I would appreciate some gentle guidance if the solution is obvious. JS const gri ...

Bootstrap CSS allows for easy closing of modals

Having trouble with the Twitter Bootstrap CSS causing my animation to open with a fade and immediately close. Not sure why this is happening, can anyone provide assistance? Update: Turns out, the bootstrap.css file already has Modals implemented. Using bo ...

Tips for starting JavaScript on Materialize 1.0

I need some help with initializing a materialize component using JavaScript. My understanding of JS is lacking, but I have had success using jQuery. Specifically, I am looking to use the Collapsible component. <ul class="collapsible"> <li> ...

Assigning a value from a .CTP template to a .JS file

Have you ever encountered a perplexing and frustrating issue? :x Let's dive into it: So here's the situation - I have a specific software deployed across 4 different environments: Development, Certification, Preproduction, and Production. Rece ...

Using JavaScript variables in CSS: a beginner's guide

My website features a typewriter effect, but I want the animation to match the length of the words exactly. I attempted using JavaScript variables in CSS, but unfortunately, it's not functioning properly. Could someone please advise me on how to remed ...

Is there a way to showcase the newly added state object on the page without having to reload the page?

I am currently showcasing the attributes (recipe title, image URL) of items from a state. These items originate from mongodb. Below is my current code flow: Create an empty array state variable named initialRecipes using const [initialRecipes, setRecipes] ...

Invisible boundary line within the column

My task involves creating a table using div elements. The layout of the table includes two columns structured as follows: <div> <div class = "columnborder"><span>Some text for column 1</span></div> <div><span>Some ...

What is the best way to ensure that an image in the navbar changes when hovered over?

In my quest to enhance my skills, I am currently trying to figure out how to create a hover effect on an image within the navbar. My objective is to have the div with the ID of "pic-index" react to hovering over the "HOME" link in the navbar and change the ...

What is the best way to alter the color of the "checkmark" in an HTML checkbox using CSS?

Is it possible to change the color of the check mark in an HTML checkbox? Currently, on Windows XP using Firefox, Chrome, or IE, the check mark appears green. I am interested in changing the check mark within an INPUT type="checkbox" to be orange. ...

When I try to enlarge a fractal in a WebGL rendering, I run into a problem

When I zoom in excessively and attempt to move the picture with my mouse, it moves too quickly. Conversely, when I zoom out significantly, the picture moves very slowly. This refers to the scaling during zooming and how the position of the picture is adju ...

Position Bootstrap buttons to the right side

I am looking to reposition the buttons in the header, shifting them from the default right side to the left side. Specifically, I want to move Abcd to the right side and have A1, A2, A3, A4, and A5 displayed on the left side. Here is my current code: < ...

CSS3 animation for rotating elements

If I have this box in CSS3 (also if, for what I understand, this is not CSS3, just browsers specific) : HTML <div id="container"> <div id="box">&nbsp;</div> </div> ​ CSS Code #container { paddin ...

JavaScript confirmation for PHP delete button

Is there a way to implement a JavaScript alert that prompts the user to confirm their action when they click the delete button? I attempted to integrate a class into an alert box: <?php //$con = mysqli_connect("localhost", "root", "root", "db"); $sql ...

Trouble Arising from jQuery Navigation Links

I'm currently working on implementing a jQuery Menu that I came across online. You can find it here: However, I've encountered an issue where the menu doesn't seem to allow links to URLs. I attempted to remove e.preventDefault from the scr ...

Replacing elements with preg_replace in HTML including diacritics

Can someone assist me in using preg_replace for the following scenario: <p style="background:white"> <span style="font-size:10.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;"> Coût de la prestation : 43.19 . ...