Style Sheet work with Mozilla but not with IE

I'm about to desin a HP. I use Style-Sheets to even the Desin on all pages and i normally use Mozilla 1.x to view the results. And by now i've seen none of the Problems all ppl tell me about Mozilla and CSS.

But i tested the Page now with IE 6. And it doesn't recognice any of my self-defined Tags. e.g.:
--------------
Style-Sheet :
Head-border {color: blue; font-size: 100%; border: 1px outset;}
---------------
HTML-Part:
<head-border>Text</head-border>
---------------

The Text isn't even BLUE or framed by a border with IE.

What did i do wrong?You can't create new HTML tags with CSS, which is what you appear to be trying. You can only redefine existing tags.

Try this instead for CSS:

#headborder {color:#00F; font-size:100%; border: 1px outset #000;}

And this for your HTML:

<div id="headborder">Div Contents Here</div>But it probaly work with Mozilla. Damn, now i have to recode my entire site, cos freakin' IE can't interpret new defined Tags.....It worked with using the .warning or #warning

The only Problen i have to solve now is how to limit the size of the Background-Color. With this way it has always the size of the whole line.Set the width of your <div> to whatever you want it. By default, <div> tags will take up all of the available width.That doesn't work. even if i set the width to 5% or 5px, it's always the full width.do you have the position set to either absolute or relative?

such as

#div {
position: absolute;
}.That doesn't work. even if i set the width to 5% or 5px, it's always the full width.

If a DIV in Internet explorer is always too wide, that's because it will stretch a DIV, or other block-level element, to be as wide as the widest line of unwrapped text. That's only if the content of the DIV flows over the bounds of the DIV. And IE did not impliment that according to W3C specs.

Try adding overflow: hidden; to the DIV you are speaking of.Adding overflow: hidden seems to have no effect. Position: absulute solved the Problem, but brings up a new one: it isn't placed within the Table it should be anymore. I could handle it with the margin-thing, but that would only work for one Browser with a certain resulution...Could you post the code you are using or a link to the code?This one is to found in the Style-Sheet File. And this is the only way i managed to solve the Problem a bit..

.cont {font-size: 75%; background: black; color: green; margin-right: 40px; margin-left: 45px; text-align: center}

Then of corse the HTML-File:
<div class='cont'>text</div>I have also found that my CSS is fine in Mozilla but it goes to pieces in IE. The address is <!-- w --><a class="postlink" href="http://www.harrymills.co.uk">www.harrymills.co.uk</a><!-- w --> and the page is only a demo, currently I'm only interested in the layout boxes.
Any ideas?

ThanksBefore, since the header and the menu were fixed, they wouldn't scroll with the page, I am pretty sure there's a hack to make that work in IE, but I wouldn't know where to look, and if you really want that, I or someone else, or you, could find it.

It works in all browser I have available to me for testing:

IE 5.01/Win
IE 5.5/Win
IE 6/Win
Netscape 7.1/Win
Opera 7/Win
Mozilla 1.5/Win
Firebird 0.7/Win

<!-- m --><a class="postlink" href="http://www.pauljunior.no-ip.com/research/harrymills/">http://www.pauljunior.no-ip.com/research/harrymills/</a><!-- m -->

Cheers.This always works for me, at least.

use an xhtml strict doctype and all standards will kick inm its great :)

o yea, and tell me if this is a bad idea.... because my site uses strict...Originally posted by omega
This always works for me, at least.

use an xhtml strict doctype and all standards will kick inm its great :)

o yea, and tell me if this is a bad idea.... because my site uses strict...
Numbah one, muh brothah: It is good to use an XHTML strict Doctype. ;)

Numbah two, muh brothah: you best not be talkin' to me, XHTML 1.1 is as as strict as they come!

Lol. Actually, as I was told, XHTML 1.1 is just XHTML 1.0 strict. I'm not quite sure, but it doesn't matter, I like to keep up with the standards as much as I can. ;)lol... ah cant wait until tomorrow... i have to go to bed soon so i dont have time now, but im gonna validate my pages and put in the images, then upload it via ftp. ah, im a geek :pThanks, it all worked perfectly and now I can start on the content! YAYGlad it's workin'.

LMAO! Dude, I dig your sig! :D :pOriginally posted by Paul Jr
Glad it's workin'.

LMAO! Dude, I dig your sig! :D :p

HEY, Running WinXP here, dont hurt its feelings... ;)
 
Back
Top