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 8233495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:08:56+00:00 2026-06-07T18:08:56+00:00

I am trying to indent this entire form: <%= form_for([micropost, micropost.comments.build], :html => {

  • 0

I am trying to indent this entire form:

    <%= form_for([micropost, micropost.comments.build], :html => { :id => "blah_form" }) do |f| %>

        <div class="field">
          <p2>Who are you?</p2>
          <%= f.text_field :commenter %>
        </div>
        <div class="field">
          <p2>What deal are you offering?</p2>
          <%= f.text_area :body %>
        </div>
        <div class="actions">
          <%= f.submit "Submit"%>
        </div>
      <% end %>

but I dont want to indent this other text area in this form:

    <%= form_for(@micropost) do |f| %>
      <%= render 'shared/error_messages', object: f.object %>
      <div class="field">
        <%= f.text_area :content, placeholder: "What's something else you want to buy?" %>
      </div>
      <%= f.submit "Post", class: "btn btn-large btn-primary" %>
    <% end %>

right now my CSS file says:

#blah_form input, textarea, b4 {margin-left:80px}
  • 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-07T18:08:58+00:00Added an answer on June 7, 2026 at 6:08 pm
    #blah_form input, textarea, b4 {margin-left:80px}
    

    Are three seperate declarations, try this instead to keep your CSS localised to that form

    #blah_form input,
    #blah_form textarea,
    #blah_form b4 
        {margin-left:80px}
    

    or maybe create an indent class:

    .indent {
        margin-left:80px;
    }
    

    That can be used on all elements that need the indent. You could make the class a little more intelligent to apply the indent to specific nested elements e.g.

    .indent > div {
        margin-left:80px;
    }
    

    (Won’t work in ie6) This is saying to apply the margin-left to all direct children of .indent that are div’s.

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

Sidebar

Related Questions

I am trying to write a simple tool using Shoes. This will indent code
I am trying to build a list that parses my entire xml document. I
i am trying to create an RssFeed using java this is the class i
I am trying to indent text in a multiple choice field. def __init__(self): super(RegisterFull,self).__init__()
I am trying to output html with jQuery. $('body').append(' <div> <div> <div></div> </div> </div>
I am trying to build a comments section for my website. In the comments
I have the following markup. <para><span class=bidi/><span class=ind/>1</para> I'm trying to achieve this... <para><span
I've run into this issue when trying to fire up a camera intent like
This is my first time trying to set up a database. My intent is
I am trying to run indent -kr -i8 on all files in my current

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.