The background color and border are failing to apply

I've been struggling to set a background color for the class="imgd", but I can't seem to make it work.

.portrait {
  border: #C7C7C7 solid 1px;
}

.circular--square {
  border-radius: 50%;
  padding-right: 10%;
  padding-bottom: 10%;
}

.imgd {
  text-align: center;
  border: solid px G7G7G7;
  background-color: gggggg;
}
<div class="lgcontainer">
  <h1>Aristotle Onassis</h1>
  <h2>1906 - 1975</h2>
  <h3>One of the richest people in the 20th century</h3>
  <div class="description">Aristotle Socrates Onassis (Aristotelis Onasis; 20th January 1906 - 15th March 1975), [1] commonly called Ari or Aristo Onassis, was a Greek-Argentine shipping magnate, who amassed the world's largest privately owned shipping fleet and was one of the world's richest...
  <div class="portrait">
    <img class="circular--square" src="https://upload.wikimedia.org/wikipedia/commons/4/46/Aristotle_Onassis.JPG" alt="Rich Boi">
    <span class="imgd">The most well-known portrait of Onassis.</span>
  </div>
  <br>
  <h4><strong>Here is a timeline of Onassis' Life</strong></h4>
</div>

Answer №1

The images show an issue with a missing number of pixels and an incorrect color format. It seems to be similar to HEX, but the absence of `#` at the beginning and the presence of 'G' as a hex digit are causing the problem:

border: solid [number] px [#][AAAAAA]

Answer №2

I noticed that your HTML document does not have a connection to the CSS stylesheet

Make sure to link your .CSS stylesheet in your HTML file before proceeding

You can use the example below and adjust the href attribute to match your CSS file name insert the provided code snippet after closing the

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

Enable the bottom footer to expand along with the content to support a dynamically growing page

I followed a tutorial on keeping footers at the bottom of a webpage (http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page) to create a site with a fixed footer. However, I encountered an issue when there is more content than can fit ...

Tips for eliminating extremely fine light and dark borders from a navigation bar

I recently had a client bring to my attention a very faint light line and thin dark line present in the active link of their navigation bar. Despite being barely visible, it is still there. I have attempted to adjust the CSS, but given that the lines are l ...

PHP is having trouble identifying the file extension for file uploads

After sending an array through AJAX and echoing it in PHP, I have the following data: [file] => Array ( [name] => XXXX.jpg [type] => image/jpeg [tmp_name] => D:\xampp\tmp\phpC5F2.tmp [error] => 0 [size] = ...

What could be the reason for DataGridView not displaying a private property of the bound class type?

In my project, I am working with a Datagridview called dgvDTMUDetails that displays a list of objects from the class BlclsStaffMember. public void ShowData() { BlclsStaffMember OBlclsStaffMember = new BlclsStaffMember(); List<BlclsStaffMember ...

When using selenium with python, the function excecute_script('return variable') may not technically return variables, even though the variable does exist

My attempt to retrieve a variable from javascript code using selenium is encountering difficulties. Despite the presence of the variable (confirmed by inspecting the source code before executing the script), the command driver.execute_script('return v ...

What is the reason for the addEventListener function not being able to access global variables?

I have set up an event listener function to utilize popcorn.js for displaying subtitles. Additionally, I have created functions that are unrelated to popcorn.js outside of the event listener and declared a global variable array. However, when attempting ...

How to automatically scroll to the bottom using jquery/css

I've recently developed a chatroom using li elements, but I'm encountering an issue where the chat doesn't stick to the bottom once it reaches a certain number of messages. I suspect it has something to do with the height settings, but I can ...

Converting SVG circle animation into textual form - a step-by-step guide!

<svg width="1000" height="100"> <circle id="orange-circle" r="30" cx="50" cy="50" fill="orange" /> <animate xlink:href="#orange-circle" attributeName="cx" from="50" to="900" dur="2s" begin="0s" ...

Tips for using a customized filtering pipe with *ngFor in Angular version 4

Implementing a custom filter pipe on a <li></li> element to enable search functionality. Users can enter a term in the <input> field and the list gets filtered accordingly. test.component.html <form id="filter"> <label>F ...

Tips for creating animations for objects in one class using another class

Currently, I am utilizing Python along with the tkinter library to develop a graphical user interface (GUI). In my codebase, there are two classes that I have defined - namely App and drawBall. The App class is derived from Tk.Frame. An issue that I am fac ...

Display the search bar under the navigation using Bootstrap

When the menu is collapsed at 1200 width, I am trying to display navigation underneath it. However, in this state, the search bar appears on the right side even when the menu has collapsed. Additionally, using a div to separate both sections of navigation ...

Adjust the width of an anchor tag

I have been experimenting with different solutions and unfortunately, I have not been successful in resolving the issue at hand. While working on a WordPress website, I encountered some challenges. Despite having some knowledge in this area, I am struggli ...

Tips for preventing HTML ID clashes while integrating with the Document Object Model of external websites

When incorporating additional HTML elements into a webpage using Javascript or jQuery, along with external CSS declarations, it is important to avoid conflicts with existing IDs and class names already present on the page. This could lead to issues if ther ...

Toggle the visibility of image elements depending on the input entered in the search bar using jQuery

I have a photo gallery grid and I am looking to implement a search functionality for an img tag's 'data-title' value, where only images with matching data will be displayed. For example, if I type "hay" into the search box, only the image be ...

Search Result Causing Navbar to Break in Bootstrap Framework

While working on implementing the search functionality with AJAX and PHP, I encountered an issue where displaying the search results breaks the navbar layout. https://i.sstatic.net/FctpA.png this is the navigation bar code <nav class="navbar ...

Unable to modify the text color within a moving button

Working on a school project and implemented an animated button style from w3 schools. However, I'm struggling to change the text color within the button. Being new to HTML, I would greatly appreciate any insights or suggestions on what might be going ...

What is the best way to apply an animation class to a modal upon clicking a button?

When I click the "x" button on the modal, I want the animation to occur. However, what currently happens is that the modal closes without the animation. Then, upon reopening the modal, the animation occurs without any clicking involved. Below is my curren ...

The Bootstrap Columns are refusing to budge to the right, opting to stack neatly beside each other instead

While working on the coding for a website homepage, I ran into an issue trying to add another column. No matter what I tried, it wouldn't move to the right as intended. Even when attempting to justify it to the right, it still didn't work properl ...

Is there a way for my extension to prevent a rickroll from starting before the video even begins?

I'm working on creating a Chrome extension that prevents rick rolls. Here's an overview of my manifest.json file: { "name": "AntiRick", "version": "1.0", "description": "Introduci ...

JS Issue with Generating Content

Introduction( kind of :) ) Starting with the process of generating 5 coffee beans for each cup of coffee. The coffee class includes a strength attribute, and my goal is to visually distinguish the coffee beans which have a strength greater than the select ...