Welcome to WebmasterWorld Guest from 54.242.72.36

Forum Moderators: not2easy

Message Too Old, No Replies

Simple CSS problems with IE 8

     

erminoka

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

1:15 pm on Sep 20, 2012 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



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

1:17 pm on Sep 20, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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

4:08 pm on Sep 20, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

4:16 pm on Sep 20, 2012 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



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

Featured Threads

Hot Threads This Week

Hot Threads This Month