Help with CSS

(3 posts) (2 voices)

Tags:

  1. ajdjackson, Member

    Hi

    Been pulling my hair out here :)

    I wish to turn off the background colour of a cell when I hover over it. Sound easy :(

    I've a simple report:
    select 'dbr.hideheader'; select 'dbr.title',''; select 'dbr.hidecolumn','PlotID'; select 'dbr.hidecolumn','SiteID'; select 'dbr.resultclass', 'plots';

    select 'dbr.report','sp_DBR_SS_Plot_Detail','3','event=click','inPlotID=PlotID','inSite_ID=SiteID';

    select 'dbr.purehtml','<div class="ss_cols">'; select a.tblContractXIDJobNo as '[PlotID]',inSiteID as '[SiteID]',fn_plot(a.tblContractXIDJobNo) from hilmark.tblsitesplotsjake a where a.tblContractXIDJobno not in (select tblSalesInv_XIDJob from hilmark.tblsalesinv_j) and a.Plot_BookDate is not null and a.Site_ID=inSiteID; select 'dbr.purehtml','</div>';

    and in the userstyles file I've the following CSS:

    .ss_cols { -webkit-column-count: 3; /* Chrome, Safari, Opera */ -moz-column-count: 3; /*Firefox */ column-count: 3; -webkit-column-width: 117px; -moz-column-width: 117px; column-width: 117px; line-height:25px; -webkit-column-gap: 10px; /* Chrome, Safari, Opera */ -moz-column-gap: 10px; /* Firefox */ column-gap: 10px; -webkit-column-rule: 1px solid #ddd; -moz-column-rule: 1px solid #ddd; column-rule: 1px solid #ddd;

    }

    .ss_cols tr:hover, td:hover {

    background-color: transparent; }
    but when I inspect the element I see that it's being over-ridden by

    tr.odd:hover td, tr.even:hover td, td.popuprow:hover, div.autocomplete ul li.selected { background-color: #B0FE86 !important; }

    from gray.css.

    Any thoughts on what I'm doing wrong.

    Thanks

    Jake

  2. myDBR Team, Key Master

    The default hover is set to !important which overriddes the normal CSS rule. Also, when you set the color to transparent, it will not clear the other definitions.

    You can try:

    .ss_cols tr.even:hover td, .ss_cols tr.odd:hover td { background-color: white !important; }

    --
    myDBR Team

  3. ajdjackson, Member

    Thanks - worked!

    I didn't appreciate the importance of !importance :)

    Cheers

    Jake


Reply

You must log in to post.