Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > ping dorayme.....can you fix this problem?

Reply
Thread Tools

ping dorayme.....can you fix this problem?

 
 
richard
Guest
Posts: n/a
 
      01-29-2011
http://1littleworld.net/sample/indexa.html

Problem is that when a second link is embedded inside the block, the
desired effect of linking the entire block is changed so that only the text
becomes a link.

Now for you flamers, I know you will harass me over the fact that I use
inches instead of pixels for the blocks. So flame away, I'm not gonna
change it for you.
 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      01-29-2011
On Sat, 29 Jan 2011 15:11:52 -0700, richard wrote:

> http://1littleworld.net/sample/indexa.html
>
> Problem is that when a second link is embedded inside the block, the
> desired effect of linking the entire block is changed so that only the text
> becomes a link.
>
> Now for you flamers, I know you will harass me over the fact that I use
> inches instead of pixels for the blocks. So flame away, I'm not gonna
> change it for you.


BTW, I tried it using <ul> instead of a table and got the same result.
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-29-2011
richard wrote:
> http://1littleworld.net/sample/indexa.html
>
> Problem is that when a second link is embedded inside the block, the
> desired effect of linking the entire block is changed so that only the text
> becomes a link.
>
> Now for you flamers, I know you will harass me over the fact that I use
> inches instead of pixels for the blocks. So flame away, I'm not gonna
> change it for you.


Forget that, you have made a more fundamental error. An A element is an
*inline* element and cannot contain a block element. Tip: DIVs and
TABLEs are block elements...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      01-29-2011
On Sat, 29 Jan 2011 17:58:34 -0500, Jonathan N. Little wrote:

> richard wrote:
>> http://1littleworld.net/sample/indexa.html
>>
>> Problem is that when a second link is embedded inside the block, the
>> desired effect of linking the entire block is changed so that only the text
>> becomes a link.
>>
>> Now for you flamers, I know you will harass me over the fact that I use
>> inches instead of pixels for the blocks. So flame away, I'm not gonna
>> change it for you.

>
> Forget that, you have made a more fundamental error. An A element is an
> *inline* element and cannot contain a block element. Tip: DIVs and
> TABLEs are block elements...


I see your point. I changed the "a" properties to display:block and got the
same result in both examples.
Question is then, how do you resolve the issue of linking block elements?
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-29-2011
richard wrote:
> I see your point. I changed the "a" properties to display:block and got the
> same result in both examples.
> Question is then, how do you resolve the issue of linking block elements?


It is not a mater of how you style it. It is invalid markup to put a
block element inside an inline element. You need to rethink your design.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Denis McMahon
Guest
Posts: n/a
 
      01-30-2011
On 29/01/11 22:11, richard wrote:
> http://1littleworld.net/sample/indexa.html
>
> Problem is that when a second link is embedded inside the block, the
> desired effect of linking the entire block is changed so that only the text
> becomes a link.
>
> Now for you flamers, I know you will harass me over the fact that I use
> inches instead of pixels for the blocks. So flame away, I'm not gonna
> change it for you.


1) Fix your broken markup

http://validator.w3.org/check?verbos...%2Findexa.html

2) There is a fairly easy method of making some elements that can not
normally be wrapped in an anchor-link appear as if they were one. You
will need to check the DTD for XHTML 1.0 Strict to see if this method
can be applied in this case.

3) If you use the method referenced at (2) above to simulate anchor-link
operation on a block level element, and then include an anchor-link
inside that block level element, you can not guarantee which of the two
destinations will appear if you click on the anchor-link inside the
simulated-anchor-link block.

Rgds

Denis McMahon

p.s. I'll tell you what the method of doing (2) is after and only after
you have corrected the page so that it generates no errors, warnings or
information markers on the validator. If you can not do that, you do not
get told the answer.
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      01-30-2011
On Sat, 29 Jan 2011 15:11:52 -0700, richard wrote:

> http://1littleworld.net/sample/indexa.html
>
> Problem is that when a second link is embedded inside the block, the
> desired effect of linking the entire block is changed so that only the text
> becomes a link.
>
> Now for you flamers, I know you will harass me over the fact that I use
> inches instead of pixels for the blocks. So flame away, I'm not gonna
> change it for you.


Never mind. Got it figured out.
What bugs the hell out of me though is, that damned validator doesn't know
when to stop checking. If you're using javascript on the page, with no link
to an external file, the validator comes across a tag and gives you an
error if it finds one.

It's so damned picky that if you use "&" like in "Bob & Dave" in a text
line, you get smacked with an error then it says, oh but that's ok, it's in
data. So if it's ok, then why the sam hell did you give an error?
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      01-30-2011
richard the sto0pid wrote:

> Never mind. Got it figured out.


No, you don't.

--
-bts
-In a broadband world, you are just a dialup
 
Reply With Quote
 
Stanimir Stamenkov
Guest
Posts: n/a
 
      01-30-2011
Sat, 29 Jan 2011 17:58:34 -0500, /Jonathan N. Little/:

> Forget that, you have made a more fundamental error. An A element is
> an *inline* element and cannot contain a block element. Tip: DIVs
> and TABLEs are block elements...


Although not a final recommendation, HTML5 is the latest development
representing what modern browsers actually implement.

<http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element>:

> Contexts in which this element can be used:
> When the element only contains phrasing content: where phrasing
> content is expected.
> Otherwise: where flow content is expected.
> (...)
> The a element may be wrapped around entire paragraphs, lists,
> tables, and so forth, even entire sections, so long as there is no
> interactive content within (e.g. buttons or other links).


--
Stanimir
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-30-2011
Stanimir Stamenkov wrote:
> <http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element>:
>
>> Contexts in which this element can be used:
>> When the element only contains phrasing content: where phrasing
>> content is expected.
>> Otherwise: where flow content is expected.
>> (...)
>> The a element may be wrapped around entire paragraphs, lists,
>> tables, and so forth, even entire sections, so long as there is no
>> interactive content within (e.g. buttons or other links).


Even lowers my dwindling opinion of this developing standard. Lets make
is easier for the unsavory characters to abuse...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FIX] Another possible fix for the missing ASP .Net tab problem Patrick Philippot ASP .Net 0 04-14-2006 11:48 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Perl Misc 21 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Python 23 03-21-2006 07:02 AM
Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee Java 22 03-21-2006 07:02 AM
Can not ping myself, but can ping others =?Utf-8?B?V0pQQw==?= Wireless Networking 6 12-26-2004 05:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57