"Utilizing Html5 to add text decoration to a div element

When working in html5, you can wrap a div inside an anchor tag. But I am facing an issue with the text decoration as text-decoration:none doesn't seem to work.

<div id="messageconv">
  <a href="#">
    <div class="messageconv">
      <img src="http://icons.iconarchive.com/icons/hopstarter/soft-scraps/16/Button-Blank-Red-icon.png" alt="">
      <img src="http://www.cqed.org/IMG/cache-30x30/5a528e158e13938e9c7ac616a6cd6d0b-30x30.png" alt="">
      test
    </div>
  </a>
</div>

CSS:

#messageconv {
  height:292px;
  border: 1px solid #cfced8;
  margin-right:5px;
  width:170px;
  float:left;
  text-align:left;
}
.messageconv {
  background-color:#e7e5f1;
  padding:5px;
  margin:2px;
}
.messageconv img {
  vertical-align:middle;
  margin-right:5px;
  border:0px;
}
.messageconv a {
  text-decoration: none;
}

Check out an example here.

Answer №1

There is a mistake in your code

.messageconv a {
text-decoration: none;
}

It should be

#messageconv a {
text-decoration: none;
}

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

Tips for assigning identifiers to dynamically generated elements in KnockOutJS

Is it possible to assign unique IDs to dynamically created elements in KnockOutJS? I have two spans - one for the button and another for a small icon in the corner of the button. There are a total of 6 elements like this, but they do not have unique IDs. ...

Focusing in on a PARTICULAR SECTION of the picture

My website has a unique concept - comparing two articles side by side. One of the articles is mine, while the other is displayed alongside it. To capture entire pages for comparison, I utilize Google's GoFullPage feature to take screenshots. The goa ...

"Enhance your Vue.js application with the powerful capabilities of vue3-easy

I am currently working on a Vue.js project utilizing the "vue3-easy-data-table" library and following the style recommendations outlined on this particular webpage: Despite attempting to apply the following CSS properties: --easy-table-body-even-row-font ...

The relationship between columns in MySQL is determined by the values they hold

I have 2 tables with the following structure: mysql> select * from customer; +-------+-------+ | name | code | +-------+-------+ | John | c1 | | Mary | c2 | | Sarah | c3 | +-------+-------+ mysql> select * from supplier; +-------+----- ...

Struggling with submitting a form in Django and retrieving all the parameters

In my Django project, I have a form that includes fields for klarf_files, pixel_size, fov, template_recipe, and template_target. However, when I post the form, only klarf_files is being captured, not any of the other fields. Despite following the documenta ...

Activate Input by Clicking on Label in Internet Explorer version 8

I am trying to implement a widget in JQuery colorbox that allows users to load files. My approach involves using an input tag with type='file' and styling it with visibility:hidden. Additionally, I have created two labels that are styled like but ...

How to prevent the scroll bar from affecting a fixed div located at the top of the page

Check out this website: I am struggling with setting up a fixed menu div at the top and a content div below it on my site. I want the scroll bar to only apply to the content div and not the header div at the top, but I can't seem to figure out how to ...

What is the best way to ensure the width of a DIV adjusts to its content before centering it?

I'm trying to make the width of the parent div adjust based on how many inline-block displayed boxes can fit in one row. When the parent div reaches 100% width and a box is too wide for the first row, it should drop down to the next line. That's ...

When using onclick() with multiple functions, only the first function will be executed

I'm facing an issue where only the first function is being executed when I try to run two functions. It seems like changing an HTML variable value might be causing the javascript execution to stop. Here is the code snippet that I am running: HTML: & ...

Array of Javascript elements in three dimensions

Currently, I am working on creating a 3D array in JavaScript, but I am facing some uncertainty in the process. My goal is to have three arrays - Provinces, Cities, and Malls - all in a sequential order, and I am looking to build a 3D array to store all thi ...

Utilizing CSS for styling a class with a dynamic name

On the server side, I am dynamically generating class names like this: <p class="level_1">List item 1</p> <p class="level_2">List item 2</p> <p class="level_3">List item 3</p> <p class="level_1">List item 1</p& ...

Ways to exit out of all TinyMCE Inline Editors

I'm currently working with TinyMCE 4 in its inline mode, but I'm struggling to figure out how to close the windows programmatically when performing other specific operations on the page. Is there a method or solution to achieve this? ...

Can the multiline option on a textarea be turned off?

Although I can utilize the standard HTML text box, I specifically require a text area for certain reasons. Therefore, I am curious if there is a way to deactivate the multiline option of the textarea? ...

Is there a way for me to upload a csv file along with a password_hash

I have successfully implemented this code on my website, allowing me to upload CSV files to my database. However, I am looking to enhance the security measures by changing $item2 from a numerical password to a password_hash. ($data[1] currently represent ...

"Enhance Your Website with Interactive Image Popups and a Convenient

I obtained the Fancybox plugin from to utilize for opening my gallery images in a popup. Additionally, I implemented a fixed navigation feature when scrolling. The issue I am facing is that when I click on the images, they open in a popup window whi ...

Web addresses and the presence of secure HTTP protocol?

Can someone confirm if it is true that when using https, URLs should begin with //[your-domain]/? A friend using WordPress mentioned this but I haven't been able to find specific information on the topic. ...

Tips for generating an about:blank webpage featuring a personalized iframe

I'm attempting to create a form with the following functionality: Enter a URL into a text box. Click a button and it opens an about:blank page in a new tab. The opened page contains an iframe that occupies the entire screen, with the src attribute se ...

"Navigate to a webpage by interacting with a text hyperlink - Harnessing the

The link I'm trying to click isn't being recognized at all. When inspecting with developer tools in Chrome, the link appears in the following structure: <main <div <ifreame #document <html <body ...

Can anyone provide assistance with understanding the background-size property?

I am struggling to resize the background image on my website, similar to the one on this website. No matter what I try with the position or background-size property, the image remains too large and does not adjust properly. Additionally, I need the image t ...

Creating movement in three distinct divisions

I am seeking a way to have three divs flying in upon click. The first DIV is positioned at the top, followed by one on the left and one on the right (both being below the top one). I wish for them to fly in from their respective directions - the top div fr ...