www.webdeveloper.com
Results 1 to 5 of 5

Thread: Why doesn't Mozilla and Opera recognize div border styles when IE does?

  1. #1
    Join Date
    Mar 2006
    Posts
    540

    Why doesn't Mozilla and Opera recognize div border styles when IE does?

    Hi, wondering why Mozilla and Opera don't seem to recognize div borders. Here's an example. Is there a border all three recognize? Thanks!
    .div1{
    background-color: rgb(204, 0, 0);
    display: block;
    height: 140px;
    width: 260px;
    border-style: solid;
    border-left: 5px #FF0000; border-top: 5px #FF0000; border-right: 5px #A90000; border-bottom: 5px #A90000;
    }
    <div class="div1"></div>

  2. #2
    Join Date
    Aug 2006
    Posts
    36
    try-----> border: 1px solid #666;

  3. #3
    Join Date
    May 2005
    Posts
    2,040
    It has to do with the order in your css. border-style:solid will pick up on a solid color of the previous spec. So try placing that after your border-left, etc. and see if it works. I'm pretty sure the standard is written that way.

  4. #4
    Join Date
    May 2006
    Posts
    135
    border-left-style
    border-left-color
    border-left-width

    is the long way if you choose that as well

    i think you can do this as well

    Code:
    border:solid 5px #666;
    border-left-color:#FF0000;
    border-right-color:#FF0000;
    border-top-color:#A90000;
    border-bottom-color:#A90000;
    those will over-riide the existing border color but the width will be the same i think.

  5. #5
    Join Date
    Mar 2006
    Posts
    540
    Man, you were both right. Perfect! Thank you very much!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles