Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-13 04:00:51

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

p tags inside a tags with spans?

Hey good people,

I am trying to accomplish a rollover technique with an author list on my site

Its working fine, but the validation doesn’t fly as no p tags are allowed inside a tags :)
I had thought that throwing a span in there would interupt the flow, and make it allowable, but obviously not.

The p output comes from an extension tag I use for author profile. I don’t foresee changing it from a paragraph tag.

As an alternative I could do a div:hover or something to that effect, but I don’t know how to work that out in IE, the buggers!

Here’s the xhtml:
<code>
<div class=“box”>
<a href=”/<txp:ext_author_section />”><txp:ext_author_name /> <span class=“lk”> <txp:ext_author_about /> </span>
</a>
</div>
</code>

Thanks,

Matthew

EDIT: In case you care to know the answer without reading all the posts: click here

Last edited by ma_smith (2005-11-17 14:09:19)


Offline

#2 2005-11-13 05:25:23

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

Is there any reason why it can’t be a div?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-11-13 05:29:42

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

Stuart,

Nope. I don’t see a reason why not. I’ve had some issue with IE showing anything other than a:hover.

Do you have a suggestion? I would love to hear it.

Thanks for the response.

Matthew


Offline

#4 2005-11-13 05:49:48

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

Problems on the existing page?

I think you may need some kind of clearing because you are floating that gravatar. It needs to be the last thing inside the span, or div if you use that. I noticed that the Amy rollover in IE is breaking out of the page.

You’re on a Mac aren’t you?

Last edited by thebombsite (2005-11-13 06:04:25)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#5 2005-11-13 06:09:14

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

Sorry Stuart,
I’m not being clear.

Notice that on artiswork.org/artists it is not validating as I have it now because I have p tags inside an a tag.
validation link at the bottom of the page.

I would be open to using something like
<code>
<div class=“hovering-div”>
</div>
</code>

<code>
.hovering-div {position: relative; top: 0px; left: 0px;}
.hovering-div:hover {position: relative; top: 0px; left: 200px;}
</code>

for instance. But I have heard of problems that IE and older browsers have recognizing :hover on other elements.

so, that’s the problem. :)

Cheers man,

Matthew

ps. I checked out freshly pressed the other day, and I dig. I think that’s a fantastic idea!


Offline

#6 2005-11-13 06:17:59

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

Ahh. I see. So a problem with div:hover then? Would this validate:-

<code>
<div class=“box”>
<a href=”/<txp:ext_author_section />”><txp:ext_author_name />
<ul class=“lk”>
<li><txp:ext_author_about /></li>
</ul>
</a>
</div></code>

That might throw the styling off a bit. Try it though. I need sleep so I’ll dream on this one a bit. :)

Last edited by thebombsite (2005-11-13 06:19:18)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#7 2005-11-13 06:24:14

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

nope. ul can’t go in the a tags either.

sleep, I heard about that once.

dreaming in code is weird, I sometimes look at someone and think, they belong in brackets – then I know its time for meee to sleep.

:)

Matthew


Offline

#8 2005-11-13 06:41:24

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: p tags inside a tags with spans?


You cooin’ with my bird?

Offline

#9 2005-11-13 07:12:48

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: p tags inside a tags with spans?

Edit: updated. HTML and JavaScript. Style with CSS, just don’t include any hide/show within it.

Last edited by Mary (2005-11-17 05:31:36)

Offline

#10 2005-11-14 03:12:43

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

Mary, et all,

I tried that, but it had no rollover effect at all? I am using safari 2.01 if that would make a diff. but I doubt it has to do with the browser?
I am reverting to what I had for the time being in order to continue to show an example of what I am trying to accomplish.

Maybe there are other ways of accomplishing what I am after?

I want a list of authors, and a short paragraph about them accompanied by their gravatar.
I want the list to be simple, and for viewers to not need to scroll down a long list to find a person they are looking for.
This is why I had used the rollover scenario. I would definitely be open to other ways of accomplishing this?

Maybe I could have each link open an article that displayed that info, but off hand that seems too cumbersome? Any thoughts?
EDIT I can’t do that, because the way the extensions work, they don’t know which information to call because it becomes unassociated with the <code><txp:ext_authors /></code> (an author list)? Hmm.

Thanks all,

matthew

Last edited by ma_smith (2005-11-14 04:03:03)


Offline

#11 2005-11-14 23:15:45

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: p tags inside a tags with spans?

I think you need to read ubernostrum’s link Matthew. I recall when I used to have a “drop-down” menu I needed a bit of javascript to force IE to recognise an li:hover. That thought has just come back to me. It should be considered as being in the correct position regarding the flow of this thread despite the fact that the subject was mentioned several posts back. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2005-11-15 02:51:03

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: p tags inside a tags with spans?

Stuart, and other folk,
I saw ubernostrum’s comment.
The .htc example doesn’t validate.
He uses a behavior:url scheme which isn’t valid at all.

So, for now, hopefully on the short term, I going to let my page be invalid – sounds like a dying patient. :) Hopefully I’ll figure out something soon.

By the way, what kind of :clear would you suggest in order for the images to float properly Stuart? Or if I put them in there own div’s (the < p > and the < img > inside a third div, would that do the trick?

Thanks,

matthew

Last edited by ma_smith (2005-11-15 03:25:32)


Offline

Board footer

Powered by FluxBB