What is wrong with this script?

Discussion in 'CSS' started by cpugeekies123, Jun 26, 2011.

  1. #1
    I was using an hr code and it didn't work can someone help?

    <html>

    <head>
    <title>This is Our Title</title>
    </head>

    <body>
    <b>This Text is Bold</b> This Text is Not Bold
    <hr "color:red"/>This is Under the Horizantal Line
    </body>

    </html>:confused::confused:
     
    cpugeekies123, Jun 26, 2011 IP
  2. ntomsheck

    ntomsheck Peon

    Messages:
    87
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to define color as a style attribute.
    <hr style="color:red" />
    This is true for all inline CSS
     
    ntomsheck, Jun 27, 2011 IP
  3. patrick0001

    patrick0001 Member

    Messages:
    340
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    alternatively you can define the color code, as below.

    <html>

    <head>
    <title>This is Our Title</title>
    </head>

    <body>
    <b>This Text is Bold</b> This Text is Not Bold
    <hr style="color:#FF0000" />This is Under the Horizantal Line
    </body>

    </html>
     
    patrick0001, Jun 28, 2011 IP
  4. jcyber

    jcyber Active Member

    Messages:
    892
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #4
    A+, there any thread where i can answer an problem?...lol
     
    jcyber, Jul 2, 2011 IP
  5. karoshio

    karoshio Active Member

    Messages:
    143
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    65
    #5
    Alternatively you can add CSS to it to make it even easier in the HTML.

    hr {
    color: #FF0000;
    background-color: #FF0000;
    }

    You need both because IE(unsure about 9) uses color and firefox and others user background-color for styling HR. Hopefully you know how to implement CSS into your webpage.
     
    karoshio, Jul 5, 2011 IP