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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    background: url and <!DOCTYPE html>

    I have the following in my CSS:
    Code:
     .Vdivider {
      background: url("VDivider.png") no-repeat right top;
      min-height: 60px;
      }
    In the index.html I got:

    Code:
    <div class="VDivider">					
    	Text to put in box...
    </div>
    The strange thing is: when I don't start my index.html file with
    Code:
    <!DOCTYPE html>
    it displays perfectly in Chrome with the vertical dividers as well but IE is completely garbage. When I put the doctype in front then IE displays the page fine, except no vertical dividers and in Chrome the vertical dividers will be gone as well.

    Any clues?

    Thanks in advance!
    Last edited by rept; 04-10-2012 at 02:11 PM. Reason: put code tags around codes

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    You certainly need a doctype to make IE display correctly.
    This suggests a problem elsewhere. Can you give a link to your page?

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Please post your complete code a link to your page.

    and btw, you need a DOCTYPE, always!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SB65 View Post
    You certainly need a doctype to make IE display correctly.
    This suggests a problem elsewhere. Can you give a link to your page?
    Yup that's what I found out as well but I find it strange that the seperators dissappear in chrome after doctype is set.

    This is the page: www.qrright.com

  • #5
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,957
    Thanks
    9
    Thanked 727 Times in 721 Posts
    Ah. Css is case-sensitive:

    Code:
    .Vdivider {
      background: url("VDivider.png") no-repeat right top;
      min-height: 60px;
      }
    Code:
    <div class="VDivider">					
    	Text to put in box...
    </div>
    The absence of the doctype causes some browsers to render in "quirks mode" - so css is not treated as case sensitive, but IE displays unpredictably.

    Sort your cases and it should be OK.

  • #6
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by SB65 View Post
    Ah. Css is case-sensitive:

    The absence of the doctype causes some browsers to render in "quirks mode" - so css is not treated as case sensitive, but IE displays unpredictably.

    Sort your cases and it should be OK.
    You rock!!! Problem solved thanks a lot.


  •  

    Posting Permissions

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