html - How can I hide with CSS only? -


i have below code in document don't control. have option upload 1 custom css file overrides. how can accomplish this? rid of vendor link on our site. css, have set tricky.

<div style="display:block !important;text-align: center !important; padding: 15px; visibility:visible !important; opacity:1 !important;      height:auto !important; width:auto !important; op:auto !important; bottom:auto!important; left:auto !important; right:auto !important;">     <a href="http://vendorsite.com" target="_blank" style="display:inline !important; font-size: 11px !important;          visibility:visible !important; position:relative !important; opacity:1 !important; height:auto !important; width:auto !important; top:auto !important; bottom:auto!important; left:auto !important; right:auto !important;">         powered vendor site     </a> </div>  

no, not possible pure css, !importants declared in html override css, unless there parent object not displayed above, can override.

if !important tags not there, following work:


does have parent elements? don't have attributes mess on parent div, if code code alone, can try:

div { display: none; } 

but that's terrible idea , hide divs.

to apply css, either name classname,

<div class='parent-div'></div>  .parent-div { display: none; } 

an id attribute:

<div id='parent-div'></div>  #parent-div { display: none; } 

or other attribute:

<div animal='dog'></div>  div[animal='dog'] {display: none;  } 

you could hide child a tag:

a[href="http://vendorsite.com"] { display: none;  } 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -