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

  • Home
  • SEARCH
  • 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 6147145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:03:45+00:00 2026-05-23T19:03:45+00:00

My problem is with the below html <div class=editor-container> <div class=editor-row curFocus> <div class=editor-label>

  • 0

My problem is with the below html

<div class="editor-container">
   <div class="editor-row curFocus">
       <div class="editor-label">
           <label for="FirstName">First Name</label>
       </div>
       <div class="editor-field">
          <input class="text-box single-line valid" id="FirstName" 
                name="FirstName" type="text" value="Nancy" maxlength="20">
       </div>
   </div>
</div>

When the user selects the input field, I add class “curFocus” to the outer div via some javascript to highlight both label and the input field.

My css is –

.editor-container {
    border: thin solid #444444;
    display: table; width: 100%;
 }
.editor-row {
  width: 100%; display: table-row;
}
.editor-label {
  padding-left: .4em; width: 40%;
}
.editor-label, .editor-field {
   padding-right: .4em; padding-bottom: .2em; padding-top: .2em;
   display: table-cell;
 }
 .curFocus {
   border: 2px solid #05365b;
   background-color: #d3e5f2;
   margin: 3px; padding: 3px;
  }

My problem is that while using debuggers in Chrome 12 and IE9, they both show the border settings being applied to the outer div. But, when viewing the form, neither browser display’s the specified border. All other css settings work correctly. I also tried changing definition of “.curFocus” to “.curFocus div”. But this applied the style to each of the nested div’s also, but did display borders on all of the divs.

While I’m not a CSS expert, it is not obvious why this shouldn’t work.


Edit
Here is jsfiddle link – http://jsfiddle.net/photo_tom/KmsF5/1/. While testing this it does work correctly in IE9 if in IE7 compatibly mode. Otherwise, it does not display correctly.
Sorry about not including link, still getting use to fact that jsfiddle even exists.

  • 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-23T19:03:46+00:00Added an answer on May 23, 2026 at 7:03 pm

    Well, I can tell you what’s causing it, but I can’t tell you why. Elements with display: table-row; can’t have a border applied to them. You can apply the border to the table-cell children of the .curFocus element, but not the table-row itself.

    Again, no idea why this silly rule exists, but you can fix your problem with some CSS:

    .curFocus {
       background-color: #d3e5f2;
       margin: 3px; padding: 3px;
    }
    
    .curFocus>div {
       border: 2px solid #05365b;
       border-width: 2px 0px;  /* top and bottom border for all the table-row's immediate children (table-cells) */
    }
    
    .curFocus>div:first-child {
        border-width: 2px 0px 2px 2px; /* left border for the leftmost table-cell */
    }
    
    .curFocus>div:last-child {
        border-width: 2px 2px 2px 0px; /* right border for the rightmost table-cell */
    }
    

    See http://jsfiddle.net/d772N/

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

Sidebar

Related Questions

The divs below appear in that order in the HTML I am parsing. //div[contains(@class,'top-container')]//font/text()
I have below html: <div class=threeimages id=txtCss> <a> <img alt=Australia src=/Images/Services%20button_tcm7-9688.gif/> </a> <div class=text
Below is a complete html page that shows the problem. The myDiv should be
Given the following html table and script shown below I am having a problem
What is the problem below? routes.MapRoute( Default2, // Route name {controller}/{action}/{id}, // URL with
The problem below is ralated to my previous question Converting static link library to
Solution to original problem (below) may have been discovered. I commented out <identity> ...
I need a simple SQL to accomplish the below: Problem: When a petrol bunk
Here is my current question: I'm guessing that my problem (described below) is being
That was helpful kgiannakakis. I'm facing a problem as below: a = ['zbc','2.3'] for

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.