css - How to add spaces between each row in dataTable -


how add spaces between each row of table. try this

<p:datatable styleclass="yourtableclass">     <p:column style="background-color: ##eff2f9">          //content here     </p:column> </p:datatable> 

but not work

i used primefaces 2.2.1 enter image description here

firstly, check browser make/version: border-spacing not supported on ie6/7. secondly, border-spacing works when border-collapse of table set separate. primefaces specific stylesheet has set collapse (which general ui preferred form of border representation). way border-spacing won't work.

thus, all should work, including ie6/7 hack on last declaration:

.yourtableclass {      border-collapse: separate;      border-spacing: 10px;      *border-collapse: expression('separate', cellspacing = '10px'); } 

with

<p:datatable styleclass="yourtableclass"> 

(favour classes on inline styles)


update: per screenshot , comments, primefaces wraps generated html <table> inside <div> , applies style/styleclass on instead of on wrapped <table>. did not expect that. in such case, need following css declaration instead:

.yourtableclass table {      border-collapse: separate;      border-spacing: 10px;      *border-collapse: expression('separate', cellspacing = '10px'); } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -