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

Posted by Neredbojias on 11/25/05 09:14

With neither quill nor qualm, Steve Pugh quothed:

> 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.

Well, you and Andy seem to agree so I'll defer to your expertise. I
actually thought 'block' and 'inline' were css creations not html so
maybe that gives me a little more perspective regarding why css is so
obstreperous.

--
Neredbojias
Contrary to popular belief, it is believable.

 

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

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