You are here: Re: Formatting links « HTML « IT news, forums, messages
Re: Formatting links

Posted by Steve Pugh on 11/24/05 14:50

Neredbojias wrote:
> With neither quill nor qualm, Toby Inkster quothed:
> > Neredbojias wrote:
> >
> > > <a href="welcome.html" style="display:block"><h2>Welcome</h2></a>
> >
> > A is still inline, so can't contain an H2 element. (Just because you've
> > made it *look* like it's a block element, doesn't mean it really *is* a
> > block element!)
>
> Why not? An inline element styled to "look like" a block element takes
> block attributes, doesn't it?

No, it takes style properties as per a block level element but as far
as HTML is concerned it is still an inline element.

Consider,
@media screen {a {display: block;}}
@media print {a {display: inline;}}

Same HTML. Is it a block on screen but inline when printed? Or is it
just an inline element that looks like a block on screen and inline
when printed?

CSS does not change the rules of HTML. In HTML it is forbidden to nest
a block element inside an inline element and so long as it's HTML that
doesn't change.

> I may not be correct in this analysis, but if the only support you have
> for your view is that the css validator doesn't validate it, that means
> nothing. The w3c css validator itself is broken and frequently gives
> the wrong result for what is and is not valid css.

CSS 'validation' has nothing to do with this. It's invalid HTML.

Steve

 

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

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