944,017 Members | Top Members by Rank

Ad:
Jul 31st, 2006
0

need help with large anchor

Expand Post »
I have an anchor over an image, a subsequent <p>, and a seond image. I'm trying to validate xhtml transitional, and it says, for each of the three elements:

Quote ...
missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag...

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
the format is <a> <h3....><img /> <p> <h3....><img /> </a>

what is a good solution for this?
Similar Threads
Reputation Points: 12
Solved Threads: 1
Junior Poster
tefflox is offline Offline
174 posts
since Jul 2006
Jul 31st, 2006
0

Re: need help with large anchor

There isn't a "solution", per se. The structure you're trying to create isn't a valid structure, for several reasons. Your H3 tags aren't closed. Your paragraph tags aren't closed. You cannot place block-level elements, such as paragraphs, within inline elements, such as anchors.

You also can't wrap multiple elements inside of a single anchor.

Please describe what you're trying to do, as the code you posted as an example of your format is syntactically meaningless.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Jul 31st, 2006
0

Re: need help with large anchor

thanks for the reply. I used a class with centering and 0 padding for a <p> which includes the individual anchors, and validates okay...

is there a way to keep firefox from putting that box around the image anchor? that dotted line? it's really annoying me. thanks again.
Reputation Points: 12
Solved Threads: 1
Junior Poster
tefflox is offline Offline
174 posts
since Jul 2006
Aug 1st, 2006
0

Re: need help with large anchor

You seem to be asking several questions. Please narrow your posts down to a single, specific question, and I'll try to answer it.

Paragraphs can contain anchors. Anchors cannot contain paragraphs, as in your original post.

With your latest post, I think you're referring to the border property? If you don't want a border, for your image or anchor, apply the "border-style: none" CSS property to those elements.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Aug 3rd, 2006
0

Re: need help with large anchor

The CSS style you want to eliminate the border around images in an anchor tag is:

a img { border: none }
Team Colleague
Reputation Points: 92
Solved Threads: 21
Posting Pro in Training
FC Jamison is offline Offline
436 posts
since Jun 2004
Aug 3rd, 2006
0

Re: need help with large anchor

actually i have to use a {outline:none} for firefox, but i havent tried to use "a img {....}"
Last edited by tefflox; Aug 3rd, 2006 at 7:12 am.
Reputation Points: 12
Solved Threads: 1
Junior Poster
tefflox is offline Offline
174 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: scrollbars color or hiding not possible in Firefox
Next Thread in HTML and CSS Forum Timeline: Redirect with pre-sized pop-up code help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC