html - Apply css to first table -


see example: https://jsfiddle.net/kevalbhatt18/w361a9hg/

when see fiddle first strach result window. otherwise want see want.

my problem crate table , apply css working fine want apply border-left: 1px dotted; first table.

<div class='opendiv hide'>     <table id="addpropertyvalue1"></table>     <table id="addpropertyvalue2"></table>     <table id="addpropertyvalue3"></table>     <table id="addpropertyvalue4"></table>     <table id="addpropertyvalue5"></table> </div> 

i tried first-child .but not working

.opendiv :first-child{         border-left: 1px dotted;     } 

note : dont apply css on id directly like

.opendiv #addpropertyvalue1{     border-left: 1px dotted; } 

want pure css solution me don't want jquery or javascript apply dynamic class on table

use first-child table inside .opendiv.

like this:

.opendiv table:first-child {     border-left:1px dotted; } 

updated fiddle here.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -