There are two separate CSS files linked to the same page, but the browser is only rendering the styles from

I am in the process of developing a new web page where I want to implement my own CSS and incorporate some components from this source: . I'm facing an issue with one of the components, as the browser seems to be applying only the styles from my custom CSS file, ignoring the styles defined in the downloaded .css file from the source. Even though the class specified in the div tag is clearly defined in the external .css file, it's not being applied. Here's a snippet of the page source:

<div class="header">
    <div class="right textHeader">
      <div class="left logo"><p class="title">Portal para la gestión y control<br>
        de la implementación del sistema de información PAI
           </p> 
        </div> 
        <div class="right textInfo">
            <div class="left greetTime">
               <img src="/Content/Images/calendar.png">  27/04/2013 12:15:25 p.m.
            </div>

                <div class="greet">
                            Hola, <a class="username" href="/Account/Manage"  title="Manage">administrador</a>!
<form action="/Account/LogOff" id="logoutForm" method="post"><input name="__RequestVerificationToken" value="gsGgnTHMhT55z7aQFmarrbLlUQK4x2nuMNZP_kXbqRx2j3kWOhNSc3RptPzG8118PGgkQOpU_erRuCcZ7GvH4FhKNAlaCug0dFUGKjiFqbP5wjhFTJConDCIZzZppq090" type="hidden">                                   <a href="javascript:document.getElementById('logoutForm').submit()">Desconectarse</a>
</form>                    </div>  
        </div>
    </div>

    <div class="left imgHeader">
        <img src="/Content/Images/logo-minSalud.png">
        <img src="/Content/Images/logo-prosperidad.png">
    </div>

</div>

<div id="categories">
 <a href="/">Inicio</a> 



</div>

<div id="content">



<h2>Bienvenido</h2>

This is the section where I am trying to apply the desired class

<a href="/Home/IndexSupportItems?Length=5" class="tile wide text">Administrar banco de información</a>**<a href="/Admin/ManageUsers">Administrar usuarios</a><a href="/Admin/ListReports">Reportes gerenciales</a>

</div>

Below is a screenshot from Firebug:

And here are screenshots indicating that both files are successfully downloaded: Here's the content of my customized CSS file:

// Custom CSS rules go here
/* Example: */
.myCustomClass {
    color: #333;
    background-color: #fff;
}

...

And here's the CSS file I downloaded from the source:

// External CSS rules retrieved from the source
/* Example: */
.bg-color-blue {
    background-color: #0072BC !important;
}

...

Answer №1

The rules specified in the downloaded document pertaining to the .tile class always begin with .metro .tile, indicating that the .tile element must be nested within a parent .metro element (an element with the class of metro)

Since your HTML structure does not include the link within a .metro element, the styles will not be applied correctly.

Answer №2

Upon inspecting the loaded stylesheets, it appears that you may have overlooked adding the metro class to a parent element of your tile. For example, you can add the class to your content section like this:

<div id="content" class="metro">

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

Creating a three-row CSS layout where the middle row aligns to the right side

I am working on developing a mobile device layout with 3 blocks. The first and third blocks contain text fields, while the second block is filled with a map. However, all of my blocks don't look good when they are too wide. The browser window can have ...

Using CSS to style the footer with a body height set to 100%

I am currently working on an angularJS web app with a basic template structure: <html> <head> <link rel="stylesheet" href="style.css" /> </head> <body id="top"> <!-- Templates with vi ...

Numerous HTML forms for submission

How can I distinguish between different forms and submit buttons that are directed to a specific php function? On my current page, I have two forms but each submit button triggers different actions. I attempted to use ISSET to manage the submit actions, ...

Troubleshooting problem with Laravel and Vue integration

I have experience working on a Laravel and Vue.js project. Here is the code snippet for the Laravel view: @extends('layouts/app') @section('content') <div id="app"> </div> @endsection And here is the ...

jquery expanding the width of the final element

Is there a way to increase the width of the last 'th' in a string? I want it to be the current width plus 20px. Here is the code on Fiddle var header="<th id='tblHeader_1' style='width: 80px;'><span>Id</span&g ...

CSS Navigation Menu - Submenu displaying above main link

<div id="header"> <div class="cont"> <div id="banner"> <div id="nav"> <ul> <li><a href="index.htm">home</a></li> <li><a href="work.html">Works»</a> <ul> ...

Using jQuery to scroll to an element when it is not currently in view

Despite numerous similar inquiries on the subject, my search for a solution on Stack Overflow has been fruitless. I have a nested comment structure, akin to the Facebook Comments plugin, where clicking 'reply' triggers a form to appear at the bot ...

Autonomous boundary for list elements

I have a specific issue that can be observed in this fiddle: http://jsfiddle.net/h0qu4ffv/ where I set the margin-top of one list item to 50px, but all list items end up following this style. Is there a way to give each list item an independent margin, or ...

Tips for aligning spin.js spinner in the center of a bootstrap 3 modal?

I'm attempting to showcase and center the spin.js spinner within a Bootstrap 3 modal. Despite successful implementation in IE and FF using the code below, I am encountering issues in Chrome, Safari Desktop, Chrome IOS, Safari IOS. The problem appears ...

Modify the surrounding container of the chosen selector

I have a complex website with multiple containers. My objective is to apply a color to a container with the class "colorme" when another container, located far away from it, has the class "active". Here is how the code is structured: .tooltip:has(tool ...

When floating divs with varying heights are wrapped, they may become stuck in place

Hey there! Let's tackle a challenge: I've got a few divs, each with varying heights. These divs contain portlets that can expand in height. Here's a basic example: .clz { float: left; } <div class="container"> <div class="cl ...

Error message: "AngularJS encountered a $injector:modulerr error in Internet Explorer 11."

I've successfully created an AngularJS App that functions properly on most browsers like Firefox, Opera, Safari, Edge, and Chrome. However, there seems to be a compatibility issue with IE 11. When attempting to open the app in IE 11, the following er ...

Is it possible to build an AngularJS application without utilizing HTML5?

Having created an AngularJS application, I have noticed that it functions smoothly on modern browsers. However, some of my devices run on old browsers that do not support html5. Unfortunately, I am unable to upgrade these browsers. Is there a method to ope ...

What is the best way to resize an image in HTML based on a percentage of its height?

Within my HTML code, I have a PNG image that has been adjusted in size using CSS: .adjust-image { border:1px solid #021a40; display: block; width: auto; max-width: 100%; max-height: 1000px; } .img-container { position: relative; } ...

Using @extend with numeric classes in Bootstrap 5: A step-by-step guide

I am looking to migrate some classes from Bootstrap 4 to 5 because some of the Bootstrap classes are no longer usable, especially in utilities. I am using SASS so I can utilize @extend for this process. https://i.sstatic.net/dEDCw.png For classes .text-l ...

What are the best ways to expand image mapping?

It can be a bit challenging, but I'll do my best to explain. I have an image that is sized at 1920 by 1080 pixels and it adjusts based on the window size. The issue arises when the image mapping doesn't adjust accordingly. The coordinates remain ...

Problem with JQUERY Galleria CSS positioning alignment specifically in Firefox, Chrome works without issues

I recently incorporated jquery Galleria into my website and I am currently facing an alignment issue with the div element gallery-container. Interestingly, it appears correctly aligned in Chrome but is shifted to the right in Firefox. You can view the webs ...

Eliminate whitespace on the right side of a webpage using Bootstrap

I am currently working on a form that will appear in a modal, but I need it to be centrally aligned so that I can reduce the size of the modal. Here is what I have implemented so far: It seems like there is some space being "reserved" for columns that are ...

Aligning a div within another div with an image

My current setup looks like this: HTML: <div class="wrapper"> <img src="image.jpg" /> <div class="circle"> X </div> </div> CSS: .circle { width:50px; height:50px; border-radius:50%; background: #FF0000; } ...

As you scroll, the opacity gradually increases, creating a dynamic visual

Struggling to replicate a feature on a website where images gain opacity as you scroll down? Check out this site for reference: . While my current code somewhat achieves this effect, I'm having trouble figuring out how to apply a darker opacity gradua ...