homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Simple CSS problems with IE 8
erminoka



 
Msg#: 4497759 posted 12:46 pm on Sep 20, 2012 (gmt 0)

Hi,
I currently have a few problems with an clasmate's simple css and html code which i cant figure out, and that is the following:

The css enhancements show in FF, chrome and any other browser,
but not IE 8.

I've tried something on another clasmate's code and it was fixed, then tried the same to another code and it wasn't >.<

working HMTL:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" >

<HTML>
<head>
<title>NOODLES</title>
<div align='center'>


<link rel="stylesheet" href="example.css" type="text/css" />
</head>


<body>

<b> <h1>
Een website over Noodles.
</b> </h1>

<br/>

<blockquote>
<i> 'Noodles zijn mijn leven' </i> - Example Name</blockquote>

<ul>
<b> Soorten Noodles: </b>

<li> Yumyum Noodles </li>
<li> Noodles met ei </li>
<li> Gebakken Noodles </li>
<li> Thaise Noodles </li>

</body>

</HTML>

WORKING CSS:


@charset "utf-8";
/* CSS Document */

*{margin:0;
padding:0;}

body {

font-family : Arial ;
font-size : 12px ;
color : #FA3636;
}


NON-working HTML:


<!DOCTYPE HTML >

<HTML>
<head>

<title>Hallo</title>

<link rel="stylesheet" href="example.css" type="tekst/css" />

</head>

<body>


<p><b><h1><li> example is lekker omdat:</li></h1></b></p>
<br/>
<br/>
<blockquote><i><h4><li>het is gewoon lekker</li></h4></i></blockquote>
<blockquote><i><h4><li>Ik heb al genoeg redenen genoemd</li></h4></i></blockquote>

<p><b><h1><div align="center"><li>Dit zijn woorden</li></div></h1></b></p>
<div align="center"><ul>
<blockquote><i><h4><li>appel</li></h4></i></blockquote>
<blockquote><i><h4><li>vlees</li></h4></i></blockquote>
<blockquote><i><h4><li>leegte</li></h4></i></blockquote>

</body>

</HTML>

Css is the same as the working one.

I tried to change the doctype to the same as the working one, didnt do anything.
The problem is, to repeat myself again, that the color, font etc don't show in IE but do in Chrome etc.

Thanks in advance.

PS: Please don't flame on the simpleness of these scripts, its retarded easy i know.

[edited by: alt131 at 1:05 pm (utc) on Sep 20, 2012]
[edit reason] Thread Tidy - Examplifying, removing personal details [/edit]

 

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4497759 posted 1:15 pm on Sep 20, 2012 (gmt 0)

Welcome to WebmasterWorld!
Your markup is invalid. You have uppercase <HTML> (which is invalid XHTML), an unclosed div element in your head element, and an unordered list that contains something other than a list item...

Validate [validator.w3.org] your HTML first, clean up all those errors.

alt131

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4497759 posted 1:17 pm on Sep 20, 2012 (gmt 0)

Hi erminoka, and welcome to WebmasterWorld,

In the HTML document where the styles are not being applied you have
<link rel="stylesheet" href="example.css" type="
tekst/css" />

Are the styles applied if you change that to type="text/css"?

And also validate as fotiman suggests. (Sorry fotiman - cross posting :) )

rainborick

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4497759 posted 4:08 pm on Sep 20, 2012 (gmt 0)

And use a complete <!DOCTYPE> statement to set all browsers to "Standards Compliance Mode". Otherwise browsers will display your pages in what's called "Quirks Mode" where browsers have even more differences in behavior. Search on "doctype switch" for more information.

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4497759 posted 4:16 pm on Sep 20, 2012 (gmt 0)

<!DOCTYPE html> is a complete doctype (for HTML5).

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved