Reply to Re: Formatting links

Your name:

Reply:


Posted by Jukka K. Korpela on 11/22/05 10:08

David <anonymous@anonymous_one.com> wrote:

> Leonard Blaisdell wrote:
>
>> You can't put a block element <h2> inside an inline element <a>. Do
>> <h2><a href="welcome.html">Welcome</a></h2> which puts the inline inside
>> the block.
>
> But doing that doesn't result in the output I want in either IE or FF.

You haven't told us anything about your style sheet. You apparently have some
style sheet since otherwise you would have written thusly:

> It outputs the 'Welcome' in small letters, compared to the big letters of
> regular h2 format.

Naturally, styling depends on markup.

> The code I posted displays as I want, it just gives a
> warning, though, and I thought I'd try to resolve that.

It is not a warning. What you get from Tidy is the same you would get from a
validator: a report about a syntax error, meaning that your document does not
comply with HTML specifications, and isn't strictly speaking an HTML document
at all; hence there is no specification on what a browser should do with it.

> (You can try it yourself and see the difference I'm talking about.)

Why don't you tell the URL to help people who might help you for free?

> Maybe the only way to resolve it is to create a new link class with the
> characteristics of the h2 class, but that is disappointing, to say the
> least. I was hoping for something a little more elegant to give a link
> the characteristics of another class, except underlined and such. But
> maybe the 'underlined and such' makes it so a new link class is the only
> way. Is it only (mis)fortunate that my hack works?

It sounds that you are thoroughly confused. There is no "h2 class", to begin
with.

Is "Welcome" a second-level heading on the page? If not, simply don't use h2
markup for it. If you style it, do _not_ try to make it appear in the style
you expect browsers to use for second-level headings, because that would
confuse users. Start from something simple like

<div class="greeting"><a href="...">Welcome</a></div>

though it's highly questionable whether a greeting should be a link (and
whether you should waste space and user's time with "Welcome" texts, which
are a common signal of naive design and lack of useful content - on the Web,
courtesy means getting to the point without babbling).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

[Back to original 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

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