The transformation from CSS and HTML to RoR resulted in sprites being converted into mysterious black boxes

Previously, this site was functioning fine without Ruby on Rails. However, after moving the code to Rails, a strange issue has arisen where the hover images turn black when the mouse is placed over them.

// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
html {
    height: 80%;
    width:90%
}

p {
    font-size:25px;
    font-family: Helvetica, Arial, sans-serif;
}

body {
    background-image: url('Loons-bkg.jpg');
    width: 100%;
    padding: 0;
    height: 100%;
}

#logo {
    width: 100%;
    height: 190px;
    background: url('Loons-Title.png');
    background-position: center top;
    background-size: contain;
    background-repeat: no-repeat;
}

div.wrapper {
    position: relative;
    width: 80%;
    height: 100%;
    margin-left: 10%;

}

#blog {
    position: absolute;
    border-style: solid;
    border-width: 2px;
    width: 60%;
    padding: 30px;
    min-height: 92%;
    background: rgb(255, 250, 250);
    background: rgba(255, 250, 250, .5);
    left: 20%;
}

#navbar {
    height: 65px;
    width: 700px;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    overflow: hidden;
}

#navbar li {
    float: left;
    background-image: url(image_path('Loons-menu-sprite.png'));
}

#navbar a {
    display: block;
    padding-top: 66px;
    text-decoration: none;

}

#nav-bio {
    width: 79px;
}

#nav-bio:hover {
    width: 79px;
    background-position: 0px -66px;
}

...

This is the application view

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>Loons</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
<div id = 'logo'></div>
<ul id="navbar">
        <li id="nav-bio"><a href="#">Bio</a></li>
        <li id="nav-music"><a href="#">Music</a></li>
        <li id="nav-video"><a href="#">Video</a></li>
        <li id="nav-press"><a href="#">Press</a></li>
        <li id="nav-shows"><a href="#">Shows</a></li>
        <li id="nav-shop"><a href="#">Shop</a></li>
</ul>
<div class = 'wrapper'>
    <div id = 'blog'>
<%= yield %>

                              <iframe width="600" height="500" src="http://www.youtube.com/embed/MQ24QnrPKwo" frameborder="0" allowfullscreen></iframe>

       </div>
     <div id ="social">
              <ul id="social-media">
           <li id="facebook"><a href="https://www.facebook.com/pages/Loons/157520584337783?v=info">b</a></li>
           <li id="bandcamp"><a href="http://loonsmusic.bandcamp.com/">b</a></li>
           <li id="rc"><a href="#">b</a></li>
       </ul>
       </div>
   </div>
</body>
</html>

Answer №1

By utilizing the rails scaffold --no-stylesheets command, you can prevent the need to delete the scaffold.css file down the line.

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

Achieving consistent alignment for text on a curved path

I am working on a unique "flow-builder" project and I need to achieve this specific result: https://i.sstatic.net/6TTuS.png At the moment, my current edge looks like this: https://i.sstatic.net/9ydzx.png The text on the edge is currently aligned with the ...

The options in the drop-down menu appear to be stuck and remain in place

Can someone with expertise lend me a hand? I've been racking my brain over this issue, and while I feel like I'm on the right track, I just can't seem to make my sub-sub menu items drop down to the right on hover. I suspect there might be c ...

css media queries not taking precedence over default styles

Struggling to find a solution as no similar case was discovered!! To avoid adding a class name for each page, I am eager to utilize a generic class name as shown below: <div id="news"> <div class="news column">content 1</div> &l ...

Top Choice for Customizable Location Bar Dragging

I'm currently working on an app that features a draggable location bar. This feature will allow users to navigate through chapters in a book and will be displayed at the bottom of the screen, similar to Kindle or other mobile reading applications. I ...

Buffering ceases on the video

I am experiencing an issue with 4 videos and a preloader, which should hide once all the videos are fully buffered. <div id="preload"> <h1> Download... </h1> </div> <video preload="auto" class= ...

What is the best way to position a button to the right side of the screen?

Is there a way to align a button to the right of a page? I attempted using text-align: right; and align-content: right; In addition, I want the button to utilize display: flex; #hideShow { display: flex; text-align: right; align-content: right; ...

Do I need to utilize a Form element?

<p>text 1<span>additional information 1</span><span>more details</span></p> <p>text 2</p> <a> hyperlink </a> <button>submit</button> <p>yet another paragraph</p> Greeting ...

What is causing Firefox to consistently shave off 1px from the border of table cells?

Why is Firefox removing 1px from the border's value as defined in the CSS file? .aprovGriditem th { border-collapse: collapse; border: 4px solid #BBC6E3; padding: 0; } UPDATE <table cellpadding="0" cellspacing = "1" runat="server" id= ...

Displaying information collected from a submission form

I am in the process of designing a cheerful birthday card and I need to transfer data from a form to the birthday card page. How can I take information from the first div (which contains the form) and display that data in the second div? <!DOCTYPE ...

What could be causing the calendar icon to not display in the table cell?

I've been working with the Bootstrap date picker inside a table, and I'm having trouble getting the date picker icon to display using the fas fa-calendar-alt css class. <td> <input type="text" id="expirydate{{$index}} ...

What is the process for using jQuery to systematically alter the src attribute of all avatar images on Twitter.com?

Summary: I am learning JavaScript and jQuery, and wanted to write a script to replace "_normal.png" with ".png" for all "img.avatar" images on Twitter.com. I encountered an error which I will explain below. Background: Practice makes perfect, so I like to ...

Ways to conceal ad container when ad space remains empty

After setting up my ad HTML like this: <div class="ad-container"> <p>Ad slot #1</p> <div id="ad-slot-1" class="ad-slot"></div> </div> I implemented the code below to collapse the ad if ...

Setting up a custom PrimeNG theme to match our unique style is a great way to

I am currently using the most recent version of "primeng": "^12.2.0", and I am looking to implement my own custom theme for primeng. Despite searching through numerous blogs, I have yet to find a solution. In an attempt to create my cu ...

Unleashing the power of ::ng-deep to access CSS in an Angular child component

I'm attempting to modify the CSS class of a child component by using ::ng-deep. Despite my efforts with various iterations of the code provided below, I have been unsuccessful in accessing the CSS. The structure of the HTML component is depicted in th ...

What is the process for closing the side menu by clicking on the dark area?

I created a basic side navigation menu. When you resize the window to a smaller size, a red square will appear. If you click on this red square, the menu will open. The menu opens correctly, but I want it to close when I click on the dark area instead of ...

The functionality of the angularjs class seems to be malfunctioning

I'm a new learner of angularjs and I've created a simple page below. I have a style called "item" that I'm trying to apply to a div, but it's not working. However, if I use inline style, then it works fine. Can someone please help me f ...

AngularJS is receiving an array of null inputs

I have a form where data from my DB is displayed through WebApi. One of the controls will contain an array of values. There is a scenario where the user can edit and save it using the PUT function. Controller : $scope.Put= function () { $scope.i ...

A guide on retrieving <div> element in a WordPress function PHP file

How can I wrap a div around the output from this code snippet? add_filter( 'the_content', function( $content ) { if (is_singular('cda')) { return get_the_term_list( get_the_ID(), 'cda_cat', 'Product:' ).$con ...

How can I add styling to materializecss chip elements?

When working with tags on a web page, Materializecss makes it easy. However, I have a requirement where the tags need to be of different colors based on their types. Although this is feasible, another complication arises when supporting Materializecss keyb ...

Create a serverless PowerShell script on Azure that generates HTML content to display on a web browser

Recently, I developed a PowerShell script in Azure serverless that generates HTML content. It works perfectly fine when accessed from Firefox or Chrome as the HTML document opens in the browser. However, the issue arises when using Microsoft's browser ...