Guide on how to navigate through sub-sections within a larger section

I am in the process of developing a rails app where I would like to include a side div for displaying news updates in a vertical feed style. I have made some progress with the layout, but now I am facing issues with finding a suitable news-ticker plugin that actually works.

<%#= page.html.erb  %>

<%= stylesheet_link_tag    'welcomeindex', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'welcomeindex' %>

<div class="row">

  <div class="jumbotron col-lg-10 col-md-12" style="background-color:grey;"></div>

    <div class="jumbotron col-lg-2 col-md-12">

      <div id="newsFlash" class="updates">NEWS</div>

      <div id="newsPosts" class="">

        <%#= it will go in loop manner %>
        <% for i in 0..90 do %>
          <div class="card">
            <div class="card-body">
              Here update will go
            </div>
          </div>
        <% end %>

      </div>

    </div>

</div>  

welcomeindex.js

//= require application

$(function() {
  blinkeffect('#newsFlash');
})

function blinkeffect(selector) {
  $(selector).fadeOut('slow', function() {
    $(this).fadeIn('slow', function() {
      blinkeffect(this);
    });
  });
}  

welcomeindex.css

*= require bootstrap
 *= require application

 .jumbotron{
  height: calc(100vh - 78px);
  min-height: calc(100vh - 155px);
  //overflow: hidden;
}

.jumbotron{
  margin-bottom: 0px;
}

@media (max-width: 991px) {

  .jumbotron{
    height: 100%;
  }

}

div.jumbotron.col-lg-2.col-md-12{
  padding: 2rem 1rem;
}

.updates{
  text-align: center;
  background-color: transparent;
  border: none;
}

#newsFlash{
  color: red;
}  

Any suggestions on how to achieve this using CSS and jQuery?

Answer №1

I recently implemented a similar technique to create a scrollable div within another div using CSS.

#container {
  max-height: *custom height*px;
  overflow-y: scroll;
}

If you prefer to hide the scrollbar, you can achieve this with the following CSS:

::-webkit-scrollbar {
  width: 0px;
}

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

Is there a bug with Kendo UI? The Kendo grid pager seems to be misaligned with the bottom

Recently, I've been experimenting with Kendo UI and encountered a specific issue: The pager for my Kendo grid is not aligning properly at the bottom of the grid. Although I've attempted to adjust the CSS styling for k-grid-pager, the issue persis ...

CSS: Firefox shows the menu with adequate right margin

Just delving into CSS and have successfully crafted a dropdown menu. It's all smooth sailing in Chrome and IE, but Firefox presents two challenges: 1) The color gradient appears darker in Firefox compared to the lighter green in Chrome and IE. 2) An ...

Incorporate the operating hours of a Business

If I specifically choose Sunday and Monday with working hours ranging from 08.00 to 20.00, the output should be 1&08:00&20:00,2&08:00&20:00. How can I achieve this using Vue.js? This is my current code: <script> submitBox = new Vue( ...

What steps should I take to include a Follow - Unfollow Button on my Website?

I need to add a button on my website that allows users to either follow or unfollow a specific game. Here is the table for the follow buttons: Follow Button Table When a user clicks on the button related to the game ID, it should update the game_follow d ...

My DIV is not floating to the right as expected. What could be the issue?

I'm having trouble positioning the timer to float on the right top side of the logo. Even though using the regular style="float:right" works perfectly... <div id="whole_page" /> <div id="header" /> <?php echo " ...

How can I navigate to a specific section within a Bootstrap modal without being redirected back to the origin of the modal?

Currently in the process of creating a basic front end website with Bootstrap for styling. One section I've developed includes modals, where users click a button to open a centrally located modal window. Desired Functionality I aim to enable users t ...

Steps to Import an Image from a Subdirectory:

Currently, I am working on C# and HTML. While working on a view page, I encountered an issue when trying to load images from subfolders. When attempting to load an image from the immediate folder, it opens correctly. For example: <img data-u="image" s ...

Encountering a glitch with Chromedriver while implementing Ruby on Rails

Attempting to run a project using capybara, selenium webdriver, and chromedriver-helper is resulting in an error message. The specific error reads: Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver onl ...

Question about Selecting Boxes

I'm looking for the name of the HTML tool that is used to create a list of objects from a select field. It typically consists of two boxes with an arrow in between them. For example, when creating a group, Box A would contain a list of users and you c ...

Hide the div if the content is empty

Within a div created by the_content, there may be content or it could be null, resulting in an empty div that I want to hide. To address this issue, I attempted to store the content in variable $pageContent. However, upon declaring the variable, it either ...

What is the best way to enlarge the text in an image input field?

One of the input fields I'm working with looks like this: <input type="image" name="submit" value="submit" src="images/searchb1.png" id="button1"/> I am trying to figure out how to enlarge the text Submit on that field using CSS. Any suggestio ...

I am unable to load any HTML files in my VueJS iframe, except for the index.html located in the public

Within the template of my vue component, I am utilizing the following code: <iframe width="1000vw" height="600vh" src="../../public/myHtmlFile.html"></iframe> Unfortunately, the file specified in the src attribut ...

ion-grid featuring alternate columns

As someone who is not very familiar with Angular, I am trying to create a grid layout like the one shown here: https://i.stack.imgur.com/nBavk.png The desired layout includes alternating rows with one image followed by two images. My current attempt at a ...

How to convey emotions through Material UI MenuProps to customize paper root classes

Utilizing Material UI for a Select menu along with Emotion for custom styling. I am facing a challenge where I need to customize the root classes (MuiPaper-root or MuiMenu-paper) of the menu popover once a menu item inside the Select menu is clicked. Inc ...

What is preventing NgClass from applying the CSS styles?

I'm currently facing an issue in Angular2 where I am trying to apply different styles using ngClass within an 'NgFor' loop, but for some reason, it's not working as expected. Apologies for any language errors. <div class='line ...

Steps for preventing form submission when the username is unavailable

After checking the availability of the user name, I encountered an issue where the form still gets submitted even if the username is not available. Updated Code: <SCRIPT type="text/javascript"> $(document).ready(function(){ $("#emailch").change(fu ...

How do I directly display a variable in index.html using node.js?

Is there a way to retrieve user inputs from the index.html file, process them in Node.js, and then display the result back on the index.html page instead of redirecting to a new page? Form Handling with Express var express = require('express'); ...

Setting up the php/MVC framework on a server

Currently, I have developed a project using HTML/PHP and need guidance on uploading it to the server. My knowledge of servers is limited, but I do understand that the first page should be an index.php or index.htm file placed in the public_html folder. How ...

Issues with displaying or hiding a DIV using javascript - popup box unresponsive

I am working with this ASPX code: <div id="IsAccountingOk" class="modalDialog"> <div> <a href="#close" title="Close" class="close">X</a><br /> <asp:Label ID="lblIsAccountingOkHeader" runat="server" Text ...

Animated Gradient Header with CSS

I've been attempting to add an animated gradient to my header class, but so far I haven't been successful. I want the gradient to apply only to the header, not the body. Here's the link I'm using for reference: Can anyone offer some i ...