logo
down
shadow

Hide specific elements from html using css


Hide specific elements from html using css

Content Index :

Hide specific elements from html using css
Tag : html , By : lifchicker
Date : November 23 2020, 01:01 AM

With these it helps You could use nth-of-type:
    .test:nth-of-type(2) a, .test:nth-of-type(4) a{
       display:none;
    }
<div class="test">
   <a href="#" class="demo">Demo1</a>
</div>
<div class="test">
   <a href="#" class="demo">Demo2</a>
</div>
<div class="test">
   <a href="#" class="demo">Demo3</a>
</div>
<div class="test">
   <a href="#" class="demo">Demo4</a>
</div>
  .test:nth-child(even) a {
    display: none;
  }
<div class="test">
  <a href="#" class="demo">Demo1</a>
</div>
<div class="test">
  <a href="#" class="demo">Demo2</a>
</div>
<div class="test">
  <a href="#" class="demo">Demo3</a>
</div>
<div class="test">
  <a href="#" class="demo">Demo4</a>
</div>

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

How to get at specific HTML elements of a document using C# and Hide them/Show them etc


Tag : chash , By : Mahesh
Date : March 29 2020, 07:55 AM
it fixes the issue Basically I want to load a HTML document and using controls such as multiple check boxes which will be programmed to hide, delete or show HTML elements with certain ID's. So I am thinking I would have to set an inline CSS property for visibility to: false on the ones I want to hide or delete them altogether when necessary.
<table runat="server" id="tblMain">
      <tr runat="server" id="tr1">
              <td runat="server" id="tdName">
                 dummy name
              </td>
              <td runat="server" id="tdSurname">
                  dummy surname
              </td>
              ...

hide all elements wit specific alt value


Tag : jquery , By : Zelos
Date : March 29 2020, 07:55 AM
this will help I want to be able to hide all elements which have an ALT value of 3 using jquery. , Try this:
$('[alt="3"]').hide();
$('div[alt="3"]').hide();
var theValue = 3;

$('div[alt="' + theValue + '"]').hide();

extract specific data from a HTML table or hide specific lines


Tag : javascript , By : Jody Bannon
Date : March 29 2020, 07:55 AM
will help you Please help as this is doing my head in. My scripting skills are basic but I learn quickly. I have HTML code that runs a java script on an external website and displays a table. In my case it is a football leagues upcoming fixtures. I want to display this table using the code on our clubs website but I only want it to show certain lines of the table, ie only the matches that include the 2 teams from our club which is Watford Ladies FC. , Try adding this script to your html,
<div id="lrep509554198" style="width: 350px;">Data loading....<a href="http://full-time.thefa.com/Index.do?divisionseason=511456772">click here for Under 15's Division Two</a><br/><br/><a href="http://www.thefa.com/FULL-TIME">FULL-TIME Home</a></div>
<script language="javascript" type="text/javascript">
var lrcode = '509554198'
</script>
<script language="Javascript" type="text/javascript" src="http://full-time.thefa.com/client/api/cs1.js"></script>
<script type="text/javascript">
function load() {
    var trElements = document.getElementsByTagName('tr');
    var trsWithMatch = new Array();
    for (i = 0; i < trElements.length; i++) {
        var innerChildr = trElements[i].innerHTML;
        if(innerChildr.indexOf('Watford Ladies Wasps') == -1) {
            trsWithMatch.push(i);
        }
    }
    if(trsWithMatch.length != 0) {
        for (i = 0; i < trsWithMatch.length; i++) {
            var indexFor = trsWithMatch[i];
            var trMatched = trElements[indexFor];
            trMatched.style.display = "none";
        }
    }
}
window.onload = load;

</script>

Hide HTML elements from specific devices


Tag : html , By : desmiserables
Date : March 29 2020, 07:55 AM
it helps some times I want to hide some HTML elements on a page for specific devices, so I can optimize the page structure when I look at it on iPad rather than PC.. , Use below media query for only desktop
@media only screen and (min-device-width : 1024px) {
    div.x1 { 
        visibility: hidden;
    }
}

Hide specific elements onload or ready or page:change if select tags have specific value


Tag : jquery , By : Rb.Ridge
Date : March 29 2020, 07:55 AM
will help you Assuming whatever you have there is correct (since there is no HTML to look to). Try this
$(function(){
   $('.q_type_select').each(function(){
    var $this = $(this);
   if ($this.val() == 'text' || $this.val() == 'area') {
        $this.closest('.question_fieldset').children('.choice_fieldset').hide();
        $this.closest('.question_fieldset').children('.add_fields').hide();

    };
  })
});
Related Posts Related QUESTIONS :
  • Outlook not displaying a portion of HTML
  • Remove radio button text only with CSS
  • How to use "v-if" in Vue.js to render a <span> only if parent div has a specific property?
  • How to Extract just the Date from Angular Material Datepicker
  • @keyframes not working, I have tried everything i can think of
  • Bootstrap fix form to bottom of the page
  • How to hide a list element in html
  • How to stop repeating image
  • How do I prevent the GET method from encoding HTML special characters in the URI?
  • CSS/HTML: How do I change the color of the check mark within the checkbox input?
  • attaching a file path in a html form
  • Flip <canvas> (rotate 180deg) after being published on page
  • Is there an application I can show a client the speed of their site via differring internet connections?
  • Html / Email / Distribution list problem from a noob
  • Inspiring web experiments and technical demos
  • Can I load javascript code using <link> tag?
  • Lisp-style quotation in HTML
  • How to put text float around image like some newspapers' format using CSS?
  • Technical reasons for not having large background images in websites
  • HTML 5 Structure tags demo
  • Angular - String interpolation of undefined variable
  • Is there any way to edit specific Column of table using mat-table in Angular material
  • How can I set a text as a shadow for a heading element?
  • How to fix the forms making the buttons overlap
  • Splitting XML into multiple HTML pages with XSLT?
  • How to justify empty divs in flex container
  • How to blur in CSS only one layer of when you have multiple layers in background-image?
  • Scrollable html table with fixed first row and first column, along with angular material controls within the cells of ta
  • In Django, how to extract ID attribute from html Input tag, WITHOUT using django forms
  • how to fix link tag in html after changing css
  • How do I add a top padding to the second row?
  • Is it possible to split XML into multiple HTML pages with page navigation?
  • AngularJS: responsive height in bootstrap
  • Hide second line of text with CSS
  • repeating-linear-gradient not working in Edge browser and internet Explorer Browser
  • how to make search and form category merges like amazon on bootstrap
  • Bootstrap: Rearranging rows into columns and changing the order of elements
  • How can I move a label under a text box?
  • How save LinearGradient To database
  • How to reposition an image with a linear gradient using css?
  • HTML audio will not play when page opened by batch file
  • CSS Three Tone Diagonal Background
  • How to use slots inside of template components in HTML
  • Using span tags in meta description & title, for dual languages
  • How to make an icon/span selectable by pressing Tab key?
  • Add dynamic margins using UI Kit
  • Add margin-top to textbox
  • What is the correct semantic HTML markup for a title (book, movie, etc.), according to the spec? Is it an <em> tag
  • How to make an animation in Geoserver or in Leaflet
  • Buttons overlapping when shrinking window
  • Stretch an element to the end of the automatically calculated grid, not just the explicit grid
  • What relation is there between Angular's <ng-content> and ShadowDOM
  • CSS background for div element is not working
  • CSS Marquee: multiple paragraphs overlaps
  • I want to align search bar to extreme right
  • Getting blank white space to the left of content inside pre tags
  • My viewer.html won't load any css and jss files
  • How to apply multiple styles to HTML to only part of a title?
  • Want to make text div transparent on a parallax area
  • Is there a way to make this ID plus descendants CSS rule less specific?
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com