Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Could one element have 2 classes?

    Could one element have 2 classes such as this?:
    class="bold" class="noprint"

    And if not what else could be done to achieve the same thing?

    Thanks in advance.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Sweet!
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Be careful, Win/IE5 only sees the last class.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Uh oh...I saw that thread and have been using the technique. Before, I think I used <input type=button class=but style="color:red" value=blah> which seemed to work fine. Now, I may have to go back and redo it my old way. Maybe someone could double check my old method...
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    So, without starting a new thread, is the below going to work with NS4+ and IE4+? Thanks

    <head>
    <style="text/css"
    input {font:bold 14px tahoma; width:85px; height: 23px; background-color: #000000}
    </style>
    </head>
    <body>
    <input type="button" name="but" style="color:#ff0000" value="Blah">
    </body>
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Netscape 4 ignores those styles.

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    So, this is stil;l good in all 4+ browsers?

    <head>
    <style type="text/css">
    .button {font:bold 14px tahoma; color:red; background-color:black;width: 85px; height: 25px}
    </style>

    <body>
    <input type="button" class="button" value="Click here>
    </body>

    Thanks
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Zoobie, it looks like you're mixing things up. You can always use a class and a style attribute in a tag like <img class="image" style="margin:10px;" .. etc .. >

    The question was about two classes like in the example below. Win/IE5 only sees the second classes 'yellow', 'blue', 'green'. So, in Win/IE5, those divs would not have a width, no border and no padding and margin.

    Code:
    <html>
    <head>
    <title>Untitled</title>
    <style type="text/css">
    <!--
    
    .add{
    width: 150px;   
    border:1px solid #000;
    padding: 3px;
    margin: 4px;
    }
    
    .yellow {background:#ff0; }
    .blue {background:#00ff; }
    .green {background:#090; }
    
    -->
    </style>
    </head>
    <body bgcolor="#FFFFFF">
    <div class="add yellow">Yellow background.</div>
    <div class="add blue">Blue background.</div>
    <div class="add green">Green background.</div>
    </body>
    </html>
    And by the way, styling input buttons in NN4.. don't think so..


  •  

    Posting Permissions

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