WordPress.org

Ready to get started?Download WordPress

Forums

img style (3 posts)

  1. lawrencesiow
    Member
    Posted 6 years ago #

    hi everyone, i want to put the following codes in my blog. but only in the entry section not the whole webpage.

    img {
    padding: 0.5em;
    border: 1px solid silver;
    }

    my webpage contains a header, footer and a index. i only wanted my image properties to apply in index only, how do i do that? because my header contains a photoshop design image of mine. i do not want a border for that.

    thanks.

  2. lawrencesiow
    Member
    Posted 6 years ago #

    i mean how to pull that off, editing in my css?

    thanks.

  3. lborloz
    Member
    Posted 6 years ago #

    If you want all images except your header image to use the properties that you specified, just put what you have in the CSS file and specify a separate class or ID for the header, like:

    <img src="myheaderimage.jpg" id="header" />

    Then create a separate entry in your CSS file that targets the header image like:

    img#header {
    border: none;
    padding: none;
    }

    or whatever styles you want to apply to the header image.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.