Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

new image q

  • 11-01-2011 12:45pm
    #1
    Registered Users, Registered Users 2 Posts: 287 ✭✭


    hi

    i figured out how to ad a border to image using css which is fine - just wonder if you can add a border to some images but not all images

    thanks for the help


Comments

  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    Give them a different class

    css
    img.noborder {border: 0px;}
    img.border {border: 1px #888 solid;}
    

    xhtml
    <img src="image.jpg" class="noborder" /><!-- ain't got no border -->
    
    <img src="image.jpg" class="border" /><!-- has got a border -->
    


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Assign a class to each individual image instead of assigning styles to the <img> tag itself.

    ie. Your code is currently

    html:

    <img src="...">

    CSS:

    img {
    border: thin solid #999999;
    }

    Everytime you insert any image the styles you specified are applied to it.

    Instead assign a class to the image

    <img src="1.jpg" class="border">
    <img src="2.jpg">

    CSS:

    .border {
    border: thin solid #999999;
    }

    Image 1 will have a border, image 2 won't.


Advertisement