No hyperlink appears on mouseover

This is a snippet of HTML code that I have created:

<p class="backto">
    <a href="http://saisukamal.com">
   <img src=<?php echo base_url()."images/img_top1.gif";?>><br/>
   <span style="margin-right: -5px;">Home</span></a>
 </p>
  <p class="backto1">
   <a href="http://saisukamal.com/contactus.html">
    <img src=<?php echo base_url()."images/img_top3.gif";?>><br/>
    <span style="margin-right: -5px;">Contact</span></a>
  </p>

Although the first link works fine, the second one does not seem to work. Removing the 'p' class makes it functional, indicating a potential override issue. Any suggestions on how to resolve this conflict?

Answer №1

It seems like the issue might be with how your image tags are structured. The quotation marks may not be correctly formatted, causing confusion in your HTML code.

<p class="backto">
    <a href="http://saisukamal.com">
   <img src="<?php echo base_url()."images/img_top1.gif";?>"><br/>
   <span style="margin-right: -5px;">Home</span></a>
 </p>
  <p class="backto1">
   <a href="http://saisukamal.com/contactus.html">
    <img src="<?php echo base_url()."images/img_top3.gif";?>"><br/>
    <span style="margin-right: -5px;">Contact</span></a>
  </p>

Answer №2

<!doctype html>
<html lang="en">    
<head>
  <meta charset="utf-8">
  <title>Hover example</title>
  <script>

  </script>
  <style type="text/css">
a{
    cursor: pointer;
}
  </style>

</head>
<body>
<p class="backto">
    <a href="http://example.com">
   <img src="<?php echo base_url()?>images/img_top1.gif"><br/>
   <span style="margin-right: -5px;">Return to Home</span></a>
 </p>
  <p class="backto1">
   <a href="http://example.com/contactus.html">
    <img src="<?php echo base_url()?>images/img_top1.gif"><br/>
    <span style="margin-right: -5px;">Contact Us</span></a>
  </p>
</body>
</html>

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

Error Loading Message Appears with jQuery Mobile 1.3.1 and Flot Integration

I am trying to implement a flot interactive example with jQuery Mobile 1.3.1 in my project. However, I am encountering an issue with the latest version of jQuery Mobile where there is a strange frame around the chart and a "loading" text at the bottom of t ...

Incorporate additional code into WordPress without relying on theme CSS files

Currently, my WordPress theme is looking good. However, I am facing an issue while trying to add a custom HTML form to it. Despite including the necessary CSS and JS paths within the code, the form ends up looking terrible due to conflicts with the theme&a ...

Load the CSS file once the main content has been fully loaded and parsed

Is there a method to incorporate an external CSS file, but have it downloaded and parsed only after the main content of the website has finished loading? This scenario specifically applies to the footer of a website, where the CSS should not hinder the lo ...

Issues with JavaScript and CSS functionality not functioning correctly as expected

There seems to be an issue with the order of HTML elements in the following code. When I place the div with the class thumb-bar before the full-img div, the JavaScript functions correctly. However, if I switch their positions, the JavaScript functionalitie ...

What steps must be taken to remove the icon located in the upper left corner?

https://i.sstatic.net/vQprs.png I am struggling to align the remove icon to the top. Here is what I have attempted: .skills ul { width: 100%; margin: 10px 0px 0px 0px; padding: 0px; float: left; } .skills li { border: 1px solid #a7dbf5; li ...

Enhance PHP URL rewrite by incorporating multiple parameters

Hello, I am currently attempting to implement URL rewriting using PHP with the following code: .htaccess file <IfModule mod_rewrite.c> RewriteEngine On #prevent access to (includes) folder RewriteCond %{REQUEST_URI} !-f RewriteRule ...

Missing Input Field Placeholder Display

I am facing an issue with the placeholder text not displaying in the comments section of this code. The form structure is quite simple and constructed in a table format similar to the example provided below. Placeholder text seems to be functional for all ...

Influencing the movement of one div container using another dynamic div

Apologies for the unclear title. Check out a JsFiddle DEMO to see what I mean. My goal is to move the black container as soon as it touches the red container. I want to prevent the overlap between the two and adjust the position of the red container relat ...

Modifying HTML Class Names

While engaging in web scraping, I encountered a frustrating NoSuchElement error popping up once every 2 or 3 successful attempts. This was happening even though I knew the element I was looking for was always present. It was a product's name stored in ...

Show fixed div at specific height

Is there a way to have a fixed title in a DIV that only displays once the user scrolls to the relevant section on the website? I'm looking for a solution where the DIV is hidden until the section is reached during scrolling. ...

Using HTML to trigger a POST request within an embedded PHP script

I decided to showcase my phpBB3 forum on an HTML page by using an iframe. Here's how I did it: <iframe name="inlineframe" src="http://www.website.net/forums/index.php" frameborder="0" scrolling="auto" width="100%" height="1500" marginwidth="5" mar ...

What is the equivalent of a responsive div in Polymer?

When using Bootstrap, I typically have the following code: <div class="col-xs-12 col-sm-6 col-lg-8"></div> However, when working with Polymer, I could only find this: <div class="flex-12"></div> The issue is that the div doesn& ...

Choosing "grandoffspring"

I have a complex inquiry! Let's examine three potential scenarios Situation 1 <div class="entry-content"> <p><a href="#"><img src="#"></a></p> </div> Situation 2 <div class="entry-content"> &l ...

Achieving a consistent user experience across both mobile and desktop devices without using a separate mobile version or media queries

Is it possible to have the same URL website.com display completely different content depending on whether it is accessed from a mobile device or not? I am looking for a solution that does not involve using CSS media queries or creating a separate subdomai ...

Resizing images in HTML can sometimes lead to extra white space appearing underneath the

I am facing an unusual scaling issue with my website design. Whenever I resize the browser window horizontally, the image scales correctly, but it leaves a white space below it where the rest of the page should start from if the window is large. I'm ...

Finding the Right Spot to Edit HTML Code in Microsoft Dynamics CRM

Is it possible to change the width of a custom iframe in Microsoft Dynamics CRM that is currently set at 1900px? <div id="mainContainer" class="classname_here" style="max-width: 1900px"> I was able to change it to 100% using a browser extension. Ca ...

Having trouble creating a CSS Sprite for my project. Any solutions?

I'm having some trouble with creating CSS Sprites. This is my first attempt at using sprites, so I'm still learning. Here is the HTML code snippet: <div class="dfeature-box"> <div class="icon"><img class="multi" src="images/sprit ...

What is the best way to create a full-height div overlaying a Bootstrap4 grid and sliding out from the right side of the container?

Currently, I am in the process of learning how to use Bootstrap 4. My goal is to have a div positioned on top of the grid, with content underneath it. I want this div to be aligned to the right side of the grid (not the screen), have a width of 200px, cov ...

Is it possible to submit a form to "file.php" without reloading the page?

I am in the process of creating a form for my website. The HTML code for the form tag is as follows: <form method="post" action="contactengine.php"> Currently, when a user submits the form, it sends an email to me using action="contactengine.php". ...

Is it possible to access a comprehensive list of all the elements that are currently available?

Is there a way to retrieve all HTML tag names that are supported by the browser for my web application? I want it to be displayed like this: console.log(getAllElements()) //[a, abbr, acronym, address, applet, area, base, ...] ...