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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:01:21+00:00 2026-05-23T05:01:21+00:00

Given the following CSS .comment { margin: 10px; display: block; overflow: auto; border-top-left-radius: 5px

  • 0

Given the following CSS

.comment {
    margin: 10px;
    display: block;
    overflow: auto;
    border-top-left-radius: 5px 5px;
    border-top-right-radius: 5px 5px;
    border-bottom-right-radius: 5px 5px;
    border-bottom-left-radius: 5px 5px;
    -webkit-box-shadow: rgba(0, 0, 0, .2) 1px 1px 3px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    min-height: 200px;
    width: 100% 
}

This is applied to a textarea but the right margin is ignored and the textarea goes off the screen.

why is this?

  • 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-05-23T05:01:22+00:00Added an answer on May 23, 2026 at 5:01 am

    By setting the width to 100% and a margin of 10px the textarea will be a 100% width of it’s container shifted down and to the left 10px

    To get your desired result you’ll probably need to use a container around the textarea with a 10px padding.

    See example.

    • commentA is using a container with padding
    • commentB is your original CSS

    so something like:

    <div class="comment-container">
        <textarea class="commentA"></textarea>
    </div>
    

    and

    .comment-container {
        padding:10px;
    }
    .commentA {
        width:100%;
        min-height: 200px;
    }
    

    to get started.

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

Sidebar

Related Questions

Given the following dynamically generated CSS: .ui-widget-header { border: 1px solid #4297d7; background: #5c9ccc;
Given the following CSS3 animation.... <style type=text/css media=screen> .drop_box { -webkit-animation-name: drop; -webkit-animation-duration: 2s;
Given the following HTML page a horizontal line appears at the top of the
Given the following sample form code and CSS stylesheet Form <div class="Center_300 "> <button
Given the following code <div class=container> <p>Some Text</p> <p><img src=image.jpg><p> <p>More Text</p> </div> CSS
Given the following code var a = $('<div><div></div></div>'); a.css(visibility, visible); a.find(* :visible); I receive
Given the following CSS: body { font-family: Corbel, Calibri, Verdana, Helvetica, sans-serif; font-size: 9pt;'
Given following snippet in a view: <style type=text/css> input[type=text] { width: <%: Model.CmsConfiguration.cms_form_width %>px;
Given the following: $(document).ready(function() { $('a.went-cold-turkey').click(function() { $(body).css(cursor, progress); var activity_day = this.rel; $.ajax({
I'm using Yahoo's reset.css in my new generated Rails 3.1 app. Given following app

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.