Kev O. Kev O. - 1 year ago 123
CSS Question

Css Hover Selector should select complete row

I want that the complete row is selected and not just an element in that row. Also the selection should not care about paddings and margins and just take the full width and the size of the biggest element for all elements.


<div class="container">
<div class="row">
<div class="col-xs-2">
<img src="" class="img-responsive status">
<div class="col-xs-4 myimg">
<img src="" class="img-responsive">
<div class="col-xs-6 description">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
aliquyam erat,


.row :hover {
background-color: green;

Answer Source

Just change your CSS to

.row:hover {
  background-color: green;

Thereby you can assign :hover selector to entire row. Read more about Pseudo-class selectors.

Here is you updated your jsfiddle.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download