How can I set first element to display: none;?


Tags: css,wordpress,iframe,pseudo-element

Problem :

So I'm styling this posttype in Wordpress, and when the user links to a soundcloud track that track will show in the post header. Now, if that user posts more than one link I'd like the next ones to be in the content of the post, excluding the first one which already appears in the header.

This is what rougly is output:

<div class="content">
    <p><iframe/></p>
    <p><iframe/></p>
    <p><iframe/></p>
    <p><iframe/></p>
</div>

How do I style this in CSS so only the last three iframes displays?

Michael



Solution :

Try this:

.content:first-child{
    display: none;
}

    CSS Howto..

    How to place content below a fixed image?

    How to fix each column in Table? [closed]

    How can I request a CSS attribut in HtmlUnit?

    How to change css content hover effect background color css php in this situation?

    how to make the background the same as the div size in css

    How to style using d3's .style() method instead of using CSS in style tags for .axis path {}?

    How do I make my elements occupy the width of their “max-width” specification?

    How to display 20 columns in html design

    How do I get MS Outlook to accept the CSS style display:block?

    How do I make this menu using only HTML and CSS

    CSS: How to center texts with transitioning position?

    Show some characters above a picture on hover

    How to make a photo collage using html and css? [closed]

    How do I float 3 elements right above each other and one left?

    How can I center just one element within a container?

    How to make device width-height based html & css via PhoneGap

    How to highlight the menu item for the sort type of data on the page?

    How to write this css in shorter way? see example

    How to hide a part of a CSS borderline nicely

    How do I get a fixed positioned footer, fixed width right column, left column for the rest using CSS lay-out?

    How to make a div 100% width minus a certain amount?

    How to get css button to stay active after it has been clicked?

    How to properly escape attribute values in css/js attribute selector [attr=value]?

    How to change the way a copy-paste text behaves?

    how to affect an element's width by one child element but not others using CSS

    How to set CSS for disabled checkboxes?

    How to avoid CSS interference in an HTML page

    How to make first page fullscreen and others not [closed]

    how to make full css container

    How important is it to be leaving out the last ';' inside a set of CSS rules