Web Hosting Forums

Results 1 to 2 of 2

This is a discussion on CSS question in the Hosting Talk & Chit-chat forum
Is it possible to use many CSS files for one HTML document? ie I have many pics on my site, on a few of them ...

  1. #1
    Loyal Client
    Join Date
    Mar 2002
    Posts
    50

    CSS question

    Is it possible to use many CSS files for one HTML document?
    ie I have many pics on my site, on a few of them I want to use a border on some I dont want any border.

  2. #2
    Loyal Client
    Join Date
    Sep 2001
    Location
    Misawa Japan
    Posts
    538
    Yes, you can do multiple style sheets.

    For that kind of stuff you can just create generic style definition on your style sheet and use it as needed, such as;

    .border{
    border-style: solid;
    border-width: 1px;
    border-color: #000
    }


    If you want to use the style, you can do

    <img src="" style="border">

    Doing it by class, you can do

    img.border {
    border-style: solid;
    border-width: 1px
    }

    and call it as;

    <img src="" class="border">

    Why would you want to use a class definition? because they inherit for one another. You could also have this

    img.link {
    color: #00f
    }

    and call your image like this;

    <img src="" class="border link">

    and both classes would be in effect.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •