img style (3 posts)

  1. lawrencesiow
    Posted 8 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.


  2. lawrencesiow
    Posted 8 years ago #

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


  3. lborloz
    Posted 8 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


No tags yet.