Struggling to differentiate between the various CSS elements on a webpage and pinpointing the correct CSS for use

I have been attempting to replicate the "card-deck" layout that showcases eight cards on a specific webpage. After successfully copying the HTML structure by inspecting the card-deck class, I am now facing the challenge of locating the corresponding CSS for the class="card-deck". You can view my jsfiddle here: https://jsfiddle.net/LeamJack/dnwgrxtk/1/. The HTML for the card-deck class is visible in the code, but I am unsure of how to efficiently extract the CSS styles associated solely with the card-deck class.

Answer №1

To examine the element, you have various options in most browsers.

For instance, in Chrome, by right-clicking on one of the card elements and choosing Inspect, you can open the DevTools panel to view the CSS properties of any element on the page.

Upon inspection, I noticed that the card-panel class has the following CSS rules:

.card-deck {
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    flex-flow: row wrap;
    margin-right: -15px;
    margin-left: -15px;
}

Each nested card also contains its unique CSS style that needs to be replicated.

In addition, if you check the <head> section, you will find links to two CSS files:

https://www.portland.gov/sites/default/files/css/css_Nap32wA4jB85LBZMJhLbUh8juJthC1U6LI-74yu_d5Y.css

and

https://www.portland.gov/sites/default/files/css/css_z4fhgF_myzmhopAFzinwvvWR4bdcPakuk6TPD5OyoaY.css

You can copy these files to a code beautifier website like

After copying the files, search for the card-deck class in order to extract the relevant CSS styles. It appears that the second stylesheet is where you'll find the desired CSS:

This represents all the CSS related to cards that I uncovered through a quick examination of the stylesheet using the beautifier tool:

Note: You may not require all of this CSS depending on your project requirements.

(CSS Styles here...)

Answer №2

The screenshot below highlights the right panel displaying the respective DOM element classes and the CSS file referencing these classes. This method allows you to easily identify the classes for any DOM element. Click on the provided link to access the entire CSS file.

https://i.sstatic.net/LC0vd.png

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

Troubleshooting image resolution issues in ASP web application (using C#)

I've been working on developing an asp web application that requires users to register details of a person, including uploading an image. The file name of the details/image are stored in a SQL database with the image filename saved in an NVARCHAR colu ...

When comparing two state arrays in React, it is important to note that they will not be considered equal and return a boolean (True

As I attempt to compare two arrays stored in my state, my goal is to set a boolean variable to "true" if they match. However, my current if statement fails to detect equality between the arrays. I'm performing this comparison within a setInterval() f ...

How can a variable value be implemented in HTML style within Jinjia2?

Wondering how to dynamically position a small image on a web page based on a variable value? For instance, if the v_position variable is set at 50, you want the image to be centered horizontally. And if it's set at 100, the image should display at the ...

The PHP counter conceals the comma upon loading and does not display it permanently

I'm currently working on a PHP counter and encountering an issue with the comma display. I have implemented Number Format in a PHP function to print counter digits with commas every 3 digits, but the comma doesn't remain visible after the page lo ...

Include a hyperlink to a website that was created with the help of Photoshop

Is it feasible to incorporate a hyperlink into a website that was designed using Photoshop templates? In the past, creating templates in Photoshop and then adding links with tools like Dreamweaver was common practice. I believed that dynamically adding li ...

Mistakes in design when transforming inline SVG to PNG format

One of my main objectives is to convert a <div> element that contains multiple inline svg images into a png file. The entire process must be carried out within the client's browser using JavaScript. I have experimented with various techniques: ...

Why is my data attribute not being updated by the jQuery.data() method?

Here is an example of HTML code: <div id="mydiv" data-hoo-foo="bar"></div> As illustrated above, I am attempting to achieve the following: var $mydiv = $('#mydiv'); $mydiv.data('hoo-foo'); // returns 'bar&apos ...

Unveil the modules of a Node.js NPM application

I have a Node application that is used as an npm module and serves as a dependency in the package.json file of another Node application. This application needs to grant access to internal modules to the app utilizing my package as a dependency. All these m ...

Can you explain the variance between using 'npm i' and 'npm install'?

Can you explain the distinction between running npm i and npm install? Both commands are used to install all node Modules listed in the package.json file. While the purpose of both commands is clear - to install modules, there may be subtle differences be ...

Troubleshooting issue with AngularJS $http.get function failing to show retrieved

My data is showing up when I call the URL from dataSource, but it's not displaying when I use $http.get. I am sending this data to a dx-chart using a JsonResult from my controller. Below is the code snippet that includes my AngularJS file and MVC View ...

The identifier '_toConsumableArray' has been declared beforehand

Whenever I try to start my Redux app, I encounter the following issue: ./node_modules/draftjs-md-converter/dist/index.js Syntax error: /Users/vlasenkona/Desktop/gris-seqr2/ui/node_modules/draftjs-md-converter/dist/index.js: Identifier '_toConsumableA ...

Instead of displaying a regular text box, the output unexpectedly shows "Printing [object HTML

There are some HTML and JavaScript files that I have. I've written some functions in my JavaScript file to save the values of different input fields. However, when I try to print the description, it just displays [object HTMLInputElement]. This mak ...

Arranging two tables, one slightly misplaced from the other

I have been searching through various websites, but I cannot find a solution to the specific issue I am facing. I am attempting to create a web page with a table aligned to the left side while keeping the rest centered. However, when I align items in the ...

What is the best way to utilize JavaScript variables that are declared on index.html/index.jsp in Vue.js?

Just starting out with Vue.js and I recently finished developing a Vue.js app using the terminal. I then deployed it on a Java web application and noticed that everything works fine when running it as is. However, I now need to pass a csrftoken to my Vu ...

"Media queries in CSS don't consistently apply all styles when reaching the minimum

The CSS styles I am using are as follows: @media (min-width: 1280px) { .window-padding { padding-top: 20px; padding-bottom: 20px; padding-left: 30px; padding-right: 30px; } } @media (min-width: 769px) { .windo ...

Error in React Component: Array objects in response are not in correct order

My React app is receiving data via websocket, with a big object that contains game information. One of the properties is an array of player objects: { propertyX: "X", players: [{player1}, {player2}, {player3}], propertyY: "Y" } The issue I'm f ...

Positioning elements in CSS using percentages allows for flexible and responsive

I am new to web design and I am trying to create a webpage similar to the one shown in this image. However, I want to set the height and width of the divs using percentage values instead of pixels. Whenever I attempt this, the boxes end up overlapping or ...

Combining query results/objects by id in an array within a React application with Firebase Firestore

After retrieving chat messages from a Firestore snapshot, I have the following query result involving conversations among three individuals: {timestamp: "October 25th 2020, 11:13:59 am", name: "John Doe", email: "<a href="/cdn ...

Guide for implementing async/await in conjunction with the eval() function within JavaScript

I'm currently using the eval function to evaluate strings and adding await to it to ensure all values are obtained, but unfortunately the await is not functioning correctly. Here is a snippet of my code: if (matchCard.card.status != "notstarted& ...

I am experiencing issues with the functionality of the jQuery function

I am currently diving into the world of jquery. I put together a script, but unfortunately it's not functioning as expected. 1 Here is a snippet of my HTML code <ul id="recur" class="elasticstack"> <li id=<?=$item['id']?> ...