How can I select this element?


Tags: css,select,dynamic,html

Problem :

I have code blindness, it's like snowblindness, just wth far too much code.

I have a div class dynamically generated,

<div class="even last"> 

How can I select that with CSS?

div.even last {
    background-color:#ffffff;
    height:100%;
    border-top:1px solid #F5F5F5;
    padding:2px;
    margin-top:35px;
}

Doesn't seem to work, and I just can't think more..

Thanks :)



Solution :

When multiple classes are specified with a space, it applies both of those classes to the element.

Therefore if you specify div.even AND/OR div.last it will use them.


    CSS Howto..

    How to rotate an image on click and then rotate it back after another click? Using HTML, CSS and jQuery

    jQuery or CSS - How do you make a link in a table row appear underlined even when the cursor is in a neighbouring cell?

    How can I center Twitter-Bootstrap 3 navbar buttons?

    How to make div expand width 100% responsively?

    How do you create and run an html page directly from LocalStorage?

    CSS: How to set minimum and maximum height according to inside?

    How to set the id of a 'label' HTML element?

    how to create table grid view fix header with long title name using only CSS?

    How can I use Perl to get a list of CSS elements with a color or background color attribute?

    Why is the icon shown in some browsers while other it is not

    CSS How to put an image between buttons?

    margin-top set by jQuery makes content jump. How can I make it smoothly animate?

    How to overlap items in an unordered list using CSS?

    how to change padding of last element of li in css

    How To Make Two Container Heights Match?

    Where do I put my CSS, how do I link to it from the master page?

    How can I change my code from PHP to HTML?

    How do you align left / right a div without using float?

    How to avoid ui-block div (jquery mobile) to overlap in internet explorer?

    How do you make a filter for images that have tags?

    how to recreate tex's over- underbracket using css

    How to assign a:hover, a:visited, etc. using the style attribute only [duplicate]

    How to compress CSS

    How to add contact details next to responsive Google Map

    How to specify the position of sub-menu div and prevent the menu div changed

    How to locate element on a map by xpath or css selector

    How do I tell CSS to recalculate :first-of-type after DOM dynamically changes?

    How to make image clickable if -1 z-index is given to create box-shadow?

    How to modify CSS via JQuery

    How to change css by using tag or class name in typescript?