You are here: Re: margins in IE6 « HTML « IT news, forums, messages
Re: margins in IE6

Posted by Mark on 11/10/07 18:09

André Gillibert wrote:
<snip>
>> I have given mbody a minimum height to prevent the container from
>> becoming too short on pages with sparse content.
>
> But you fixed the height to 300px.
> To avoid problems, use 'min-height', not 'height'.
> (IE may not support it, because IE isn't conforming to the CSS
> recommandation)

That's why there is a height property for IE, then a

html>body #mbody {
height: auto;
min-height: 300px;
}

rule for conforming browsers.

>>
>> Finally, I saw this technique somewhere as a way to have a graphical
>> logo while still having a h1 element for SEO purposes:
>>
>> <h1><a href="homepage"><span>My company name</span></a></h1>
>>
>> You put display:block on the a, give it a fixed pixel width to match
>> your logo image, then use the logo as a background for the a element.
>> You then put a display:none on the a span to hide the text.
>>
>
> It's a CSS hack. Typical of people who think that author's CSS (without
> user CSS) is the only way to see/render/use HTML documents.
> As all CSS hacks, it works only for two or three extremely specific
> cases, but is broken in the general case.
> For example, when I activate one of the accessibility layout user CSS of
> my browser (Opera), background images are disabled (by an !important
> rule) so that I see a hole in place of your logo.
> Is it a SEO? Not sure, but I could think that some hypotetical search
> engine could give a low rank to background images as they're
> decorations, but not part of the content of a site. A CSS-unaware search
> engine may simply ignore the image as it's not contained in the HTML code.
> To be SE friendly, please, just write normal non-obfuscated HTML code,
> as people did before SE existed. SE were designed to work with existing
> code. No need to adopt a specific coding style (but POSH) to be viewed
> by SE.

But surely a search engine crawler will just see:

My company name

in a h1 element, which is about as POSH as you can get (plus I'd expect
a textual h1 element to have more SEO weight than the text in an img alt
attribute).

> Logically, the logo isn't a background image, it's part of the content
> of the page, so you should specify it as an image, with the IMG element.

That is what I see on a lot of sites and and I don't disagree with your
argument. At the same time, the h1 'hack' (as you call it) seems to be
gaining ground. I've just noticed that it's used on the O'Reilly home
page (www.oreilly.com):

<h1>O&#8217;Reilly Media</h1>

#header h1 {
width:293px;
height:98px;
margin:0 0 0 180px;
padding:0;
background:url(/images/oreilly/oreilly_large.gif) no-repeat 0 0;
font-size:0;
text-indent:-9999px;
text-align:center;
}

I'm not claiming www.oreilly.com is any kind of authority on HTML, but
presumably the developers of the site aren't total hacks either, and
there must be some advantage to doing it this way?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация