Click to See Complete Forum and Search --> : Opera not showing h1


Ben Rogers
02-17-2004, 11:38 PM
on my site i have an empty h1 tag that i style with css to stretch it out and put a background in it so that it shows up as an image. i do this so i can change the background with each stylesheet. it works fine in mozilla and ie, but doesn't show at all in opera. (i only have 3 browsers btw)

http://projep.t35.com/ <-- homepage
http://projep.t35.com/bg/arcticbase/default.css <-- default stylesheet
http://projep.t35.com/bg/boxed/default.css <-- the other stylesheet

ray326
02-18-2004, 12:44 AM
Have you tried putting a &amp;nbsp; in it?

Ben Rogers
02-18-2004, 01:28 AM
I'll do that.

So Opera totally ignores empty elements., huh?

DaveSW
02-18-2004, 04:39 AM
Haven't tested this but try a div. divs are better suited to your purpose.

Robert Wellock
02-18-2004, 07:09 AM
A <span> instead of &amp;nbsp; would be just as good but a empty h1 is very bad

ray326
02-18-2004, 01:43 PM
Originally posted by omega
I'll do that.

So Opera totally ignores empty elements., huh?
That's really just a WAG but I know some browsers refuse to render some empty elements.

Expanding on what Robert said, an H1 is a rather important element so it might be a good idea to put H1-importance text in their set to display:none. I'll admit to being guilty of that one, too. 8)

Ben Rogers
02-18-2004, 06:40 PM
Hm.. maybe I'll just put sumtin like

h1 {
background: url(h1.gif) black no-repeat;
width: blah;
height: blah;
text-indent: -1000px;
}

Paul Jr
02-18-2004, 07:04 PM
I usually use a <div>, with the <h1> inside set to display: none;.

Ben Rogers
02-18-2004, 10:37 PM
Yeah I guess I'll do that. The H1 CyA if you get a non-css supporter seeing your page.

Ben Rogers
02-18-2004, 10:54 PM
Still doesn't show. The header code is now:
<div id="header'><h1>Project Epsilon</h1></div>

I tried 2 things:
1) Making it display: none, and then giving it a text-indent (only tried that with default style) neither worked. damn opera, horrid browser, makes ie look like firefox in my opinion.