Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2012, 01:04 PM   PM User | #1
rept
New to the CF scene

 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
rept is an unknown quantity at this point
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 01:11 PM.. Reason: put code tags around codes
rept is offline   Reply With Quote
Old 04-10-2012, 01:51 PM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
You certainly need a doctype to make IE display correctly.
This suggests a problem elsewhere. Can you give a link to your page?
SB65 is offline   Reply With Quote
Old 04-10-2012, 01:53 PM   PM User | #3
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Please post your complete code a link to your page.

and btw, you need a DOCTYPE, always!
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 04-10-2012, 03:00 PM   PM User | #4
rept
New to the CF scene

 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
rept is an unknown quantity at this point
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
rept is offline   Reply With Quote
Old 04-10-2012, 03:19 PM   PM User | #5
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
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.
SB65 is offline   Reply With Quote
Old 04-10-2012, 03:31 PM   PM User | #6
rept
New to the CF scene

 
Join Date: Apr 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
rept is an unknown quantity at this point
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.
rept is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:50 AM.


Advertisement
Log in to turn off these ads.