Unable to change background height in semantic-ui framework

I am currently utilizing a template from semantic-ui, specifically this one: . My goal is to adjust the height of the background to match the height of my image. At the moment, my image (set as the background-image) appears fine, but the background color (which I changed to red for clarity) extends beyond it, creating an empty space between the background-image and the content.

Despite my attempts at manipulating the background size, it seems that the only thing I can alter successfully is its color. Every time I try adjusting the size, it only affects the image and not the actual red background itself.

I might be misunderstanding how these two elements work together. Do you have any suggestions on how I can make the background's height align with the background-image?

Any assistance would be greatly appreciated.

Below is the CSS code:

   .ui.inverted.vertical.center.aligned.segment {
        background: red; 
        background-image: url('./images/backgroundLogo.png');
        background-repeat: no-repeat;
        /* background-size: 100%; */
        background-size: 100% 507px;;
        width:100%;
    }

Answer №1

After some investigation, I finally discovered the issue. It turns out there was a specific min-height property that was preventing my changes from taking effect. To resolve this, I added the following code:

min-height: 500px !important;

After making this adjustment, everything worked as intended.

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

Ensuring the input field and button are positioned in a horizontal line

Currently, I am developing a to-do list application using React and Chakra UI. I am trying to align the input field and the button on the same line for a more organized layout. This is the current layout: image I aim to achieve a design similar to this: ...

Having trouble adjusting the vertical position of jQuery Spinner buttons

I'm attempting to customize the jQuery spinner with styling applied like this: <span class="ui-spinner ui-widget ui-widget-content ui-corner-all" style="height: 14px;"> <input id="testSpinner" class="ui-spinner-input" name="value" aria-value ...

Steps for integrating a Django model form into a pre-designed template

I have a model form that successfully enables users to both post and upload images. When implemented on a plain template, it performs as expected. Now, I am attempting to integrate this form into a pre-designed template that already includes fields for cre ...

multiple divisions in the center

I am struggling with centering 2 divs, each containing 3 nested divs wrapped around a big main div. The code I have written is as follows: <div stye="margin-left:auto; margin-right:auto; width: 1210px;"> <div id="left" style=" float:left; width ...

Utilizing variable references in an SCSS root file when importing from a module file

My SCSS skills are still in the early stages, as I'm currently diving into the basics. I'm curious to know whether it's possible to access variables and mixins from a parent file in a child module. To better explain, here's an example: ...

Positioning Bootstrap 4 Dropdown Menus

I am currently utilizing Bootstrap 4 and I am facing a situation where I need to create a website header containing dropdown categories. Here is how it appears in normal view: https://i.sstatic.net/N90KR.png And here is how it looks when hovering/clickin ...

What is the best way to incorporate a color-changing animation into a countdown border, resembling a spinner?

I am looking to implement a timer using jQuery that will start once this circle on the page is reached. The idea is for the border color (currently white) to progressively change to red, resembling a loading spinner effect commonly seen online. After reach ...

PNG can only be adjusted to a smaller size using IMG-Responsive, as opposed to scaling from small to large

I'm facing an issue when trying to adjust the size of a PNG image with a transparent background that has a width of 279 pixels and height of 432 pixels, using the img-responsive class in Bootstrap3. The Issue: Every time I attempt to upload the pn ...

Prevent unexpected page breaks in <tr> elements on Firefox (Could JavaScript be the solution?)

Wondering if there are any ways, possibly through JavaScript or CSS, to avoid having page breaks within <tr> elements specifically in Firefox. Given that FF does not yet fully support page-break-inside, I assume this might need to be addressed using ...

Why does Chrome DevTools evaluate JavaScript before recalculating styles?

According to an article, CSS is considered render-blocking, so JavaScript will evaluate after constructing a CSSOM (also known as recalculating styles in dev tools). However, it appears in Chrome dev tools that JavaScript is evaluated before CSSOM. Why is ...

What exactly does white space signify during the inspection process?

For quite some time now, I've been experiencing a strange problem with webpack. The layout in Dev seems to be slightly different than the build. While inspecting in Firefox, I noticed that the difference lies in the white space. My question is, what e ...

Enhancing Bootstrap5 Form Floating and Form Control input fields with the addition of close buttons or 'x' clear text icons

Incorporating Bootstrap 5, my goal is to enhance the user experience by adding a close button to form floating and form control input fields for easy text clearing on mobile devices. However, the implementation is not functioning as anticipated. I am seeki ...

Flame-inspired CSS editor

My current CSS editing workflow goes something like this: I ask for feedback on a page Suggestions are given to make post titles bigger I use Firebug to inspect the post title element I locate the corresponding CSS statement in Firebug (like h2.post_title ...

Strange HTML pop-up keeps appearing every time I use styles in my code or insert anything with CSS

Recently, I created an OctoberCMS backend setup through my cPanel (I also have one on my localhost). Now, I am trying to add a background image but every time I attempt to do so, a strange HTML popup appears that I can't seem to figure out. Here is th ...

Building a loading spinner component in a react-native project

I have successfully implemented a loading spinner that is currently being used in various components of my React project. However, as I am now working on a react-native version of the application, I am faced with the challenge of recreating this loading sp ...

The use of the display property with inline-block is not functioning correctly on mobile devices

Can anyone help me figure out why my divs are displaying differently on PC versus phone? They line up well on the computer, but on the phone, the last div is on a new line. Here is a snippet of my code and screenshots for reference. Thank you in advance fo ...

Conceal the div containing all its content within

I need to hide a div with all the content inside it using this code: <form action="" method="POST" name="form"> <p for="name">text :</p><input type="text" name="name" value="<?php echo $name_g; ?>" onfocus="ClearPlaceHolder (thi ...

What is the best way to make a button stretch across the entire width of the footer on a mobile device screen?

I'm attempting to make a button located in the right rail column on my test page (in desktop view) expand to fill the entire footer of the page in mobile view. Below is the CSS and JavaScript code I am currently using: @media screen and (max-width: ...

Understanding how to automatically adjust margins in Bootstrap based on screen width

When viewing in fullscreen, the margins are set to ensure the container fits entirely within the page. However, without the 200px margin in the .gallery class, the container would be too big to fit on the page without scrolling. The problem arises when th ...

Full-Width Bootstrap Sticky Containerized

I am trying to create a sticky sidebar that fills the full width of the container in Bootstrap 4. I have written the code below, and while the sticky functionality works perfectly, the sidebar does not span the full width of the container. Can someone pl ...