Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:34:35+00:00 2026-06-17T17:34:35+00:00

I have the following CSS class: .table-price-item { vertical-align: middle; margin-bottom: 10px; font-size: 0.875em;

  • 0

I have the following CSS class:

.table-price-item {
  vertical-align: middle;
  margin-bottom: 10px;
  font-size: 0.875em;
  padding-right: 5px;
}

And the following input in simple_forms:

  <%= f.input :price, :input_html => { :class => "table-price-item" }, 
    :label => false, :as => :string, :readonly => true %>

When the form renders I get this

<input class="string optional readonly table-price-item" ...

The table-price-item doesn’t get applied because it’s overridden with this:

textarea, input[type="text"], input[type="password"], input[type="datetime"], 
input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], 
input[type="week"], input[type="number"], input[type="email"], input[type="url"], 
input[type="search"], input[type="tel"], input[type="color"], .uneditable-input 

from bootstrap. How can I get it to override that last one?

BTW the table-price-item is also applied to select2 and other items on that form.

Order in which css are linked:

<link href="/assets/bootstrap.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/select2.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/application.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:34:36+00:00Added an answer on June 17, 2026 at 5:34 pm

    Finally found the solution.

    Since the classes are described in more detail in bootstrap they got overriden.

    One way to solve this is by adding !important

    .table-price-item {
      vertical-align: middle !important;
      margin-bottom: 10px !important;
      font-size: 0.875em !important;
      padding-right: 5px !important;
    }
    

    Then they do get priority and get applied!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following CSS: table tbody tr:last-child td { padding-top: 7px; border-bottom: 0; }
I have the following css: .btn_container { cursor: pointer; font-family: Tahoma,Verdana,Arial; font-size: 11px; padding:
I have the following css code h1, h2, h3, h4 { color: #333; font-size:
I have the following CSS code: tr.uprightTr { padding: 0px; margin: 0px; height: 10px;
Say, I have the following CSS class: .upComing{ background:#ccc; font-weight:bold; } and in my
I have the following CSS class: .hidden { visibility: hidden; position: absolute; } I
I have the following CSS in my header: <style type=text/css> table, td { border-color:
I have table cell which has class cellActive. Which has following defination .cellActive{background:#DDDDDD} Now
I have the following table* column and class, and yet when the table is
I have the following markup <div id=hearingSummary> <table class=minitable> ... content removed for brevity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.