• Resolved deepbevel

    (@deepbevel)


    Hello

    I’m trying to find examples of how to combine body reference classes, like this:

    .entry-content, .entry-summary {
        clear: both;
        padding: 30px 0 0;
    }

    but only apply it to

    .attachment

    or

    .page-id

    ect..

    I don’t seem to know how to write it, for example,

    .attachment .entry-content .entry-summary {
    padding: 20px;
    }

    applies to all elements which use the content and sumary div.
    I only want it to apply to attachments.

    please help me fill the gaps in my understanding, thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • A single element padding to attachment!

    .attachment {
       padding: 20px;
    }

    An array of elements padding to both attachment and entry-content

    .entry-content,
    .attachment {
       padding: 20px;
    }

    An combination of elements padding to only the attachment when it is nested inside the entry-content, requires both classes

    .entry-content .attachment {
       padding: 20px;
    }

    Twenty Ten style.css combined example, only when the attachment-thumbnail class is nested inside the gallery-columns-4 class.

    .gallery-columns-4 .attachment-thumbnail {
    	max-width: 84%;
    	height: auto;
    }

    HTH

    David

    Thread Starter deepbevel

    (@deepbevel)

    yes! that’s exactly what I was looking for. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wordpress body reference classes’ is closed to new replies.