I'm wondering if anyone can help me. I'm getting validation errors where I'm told I'm trying to open a div inside a paragrpah.
I'm closing the paragrpah before I open the div but for some reason the validator doesn't see the closing p tag ans when I view source, the browser doesn't see it.
It's quite definatly in the code. - <div class="my class">
-
<p style="text-align: center;">
-
<br />
-
<a href="javascript:void(0)" onclick = "my script">
-
<img width="225" height="228" src="my image" alt="" />
-
</a></p>
-
<div style="position: fixed; top:50px; left: 25%;">My content</div></div>
That is my code but the closing p tag after the closing a tag goes missing. It does it more than once.
10 2041
Which browser? That should validate so it depends on what's going on before that.
I wouldn't be using XHTML self closing tags like <br /> or <img/> in HTML markup cause it's unnecessary and sometimes leads to problems.
I need to use the self-closing tags because I'm using XHTML. I know that the code should validate but the browser missed out the closing paragraph tag. I get it in Internet Explorer, Firefox, Safari, Google Chrome and Opera.
I did fix it using a division instead of a paragraph but I don't want to have to that every time and would like to know why it happens. Any other ideas?
the browser missed out the closing paragraph tag. I get it in Internet Explorer, Firefox, Safari, Google Chrome and Opera.
Sounds like you're contradicting yourself. I don't see the problem.
I meant I get the problem.
This is my code: - <div class="my class">
-
<p style="text-align: center;">
-
<br />
-
<a href="javascript:void(0)" onclick = "my script">
-
<img width="225" height="228" src="my image" alt="" />
-
</a></p>
-
<div style="position: fixed; top:50px; left: 25%;">My content</div></div>
-
This is what the browser shows: - <div class="my class">
-
<p style="text-align: center;">
-
<br />
-
<a href="javascript:void(0)" onclick = "my script">
-
<img width="225" height="228" src="my image" alt="" />
-
</a>
-
<div style="position: fixed; top:50px; left: 25%;">My content</div></div>
-
Notice the difference on the second to last line.
I just don't see that. Perhaps your script is doing something?
Do you notice that the closing paragrpah tag afer the closing anchor is missing in the second piece of code?
If you're asking if the onclick script is affect it, then I can be sure that it isn't all it does it changes the display values of two divisions.
Yes I saw that but I don't see the problem in any browsers myself.
So you have no idea what's causing it for me? Is that correct?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: LPA |
last post by:
Hi,
I have a function to take the 300 first words of a db field. As this field
contains HTML, if some tags are not closed (TABLE, TD, TR, SPAN, DIV, P,
....) the presentation is out.
Is someone have a solution ?
Thanx
|
by: Jean-Fran?ois Lacrampe |
last post by:
Hello,
I want to write a _very_ simple text parser that would replace a
string like:
"This is text with /italics/, *bold* and _underline_."
and generate automatically something like this:
"This is text with <i>italics</i>, <b>bold</b> and <span
|
by: Peter van Schie |
last post by:
Hi all,
Give an xml document that looks something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl"
href="http://localhost/archiefassistent/xsl/fulldoc.xsl"?>
<result>
<currentpage>1</currentpage>
<document id="5">
|
by: Grant Harmeyer |
last post by:
I have an XSL file that is being applied to an RSS feed, and it works great
except for 2 things:
1.) XSL doesn't close the <img> tag for xhtml even though I have it being
closed in the XSL file (I've tried <img /> and <img></img>). This blows my
xhtml compatibility.
2.) Also, the RSS feed has a namespace "dc", how do I extract data from the
elements have a dc namespace? I've tried:
<div class="bodysm"><i><xsl:value-of...
|
by: AndyZa |
last post by:
Is the following html valid?
<p><hr width="50%"></p>
Or would the following be more "technically correct"?
<p>
<hr width="50%">
Do I require the closing </p> tag?
| |
by: Mark Rae |
last post by:
Hi,
Is there a way to prevent ASP.NET 2 from stripping off the self-closing meta
tags...?
E.g.
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
is turned into
|
by: basm101 |
last post by:
Hello,
I need to know how to create closing tag elements when using DOM to add in form elements to a page.
Here is the code...the <div> I am adding to the page is called dropDownList (for legacy reasons...it isnt really a drop down list!).
I need to put in closing td tags...
I tried this:
var tdClose = document.createElement(/td);
and this:
|
by: dhruvbaruah |
last post by:
Hi I'm working on a classified website. The problem i'm facing is that in the Place an AD I have a section where you put the description of the product.
The problem is even if the user puts paras the writeup does not take it. As an admin I have to put the <br> tags in the write-ups. How do I change the script so that it automatically take the paras.
|
by: Hvid Hat |
last post by:
I'm using <xsl:copy-of select="content" /on the following XML:
<?xml version="1.0"?>
<content>
<p></p>
<p>This is a paragraph</p>
<p></p>
<p>This is another paragraph</p>
</content>
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |