Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 03-18-2009, 06:28 PM   #1 (permalink)
Registered User
 
Join Date: Mar 2009
Posts: 3
OS: xp sp3


trouble validating a piece of code

Hi there

Fairly new to HTML but I was hoping someone could help me validate the following piece of code - I can’t get the W3C validation service to accept it although the browser does actually display it as I want it. The W3C validator says ….

“document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag”

How can I re-write this so it validates but allows the text displayed under the “column 3” heading to be indented?? I originally had this text displayed inside <ul> tags which also worked on screen but produced similar results in the validation service. Must be able to do something better in the CSS or maybe not use a table??


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title>help</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" CONTENT="no">

<STYLE TYPE="text/css">
<!--
.indented
{
padding-left: 20pt;
padding-right: 20pt;
}
-->
</STYLE>
<link rel="stylesheet" type="text/css" href="../my_styles.css">
</head>

<body>

<!-- heaps of stuff snipped -->

<!-- ** START of TABLE ** -->
<table id="content_table">
<tr>
<td class="c1" valign="top" align="left"><h5>column 1</h5></td> <!-- column 1 heading -->
<td class="c2" valign="top" align="left"><h6>column 2</h6></td> <!-- column 2 heading -->
<td class="c3" valign="top" align="left"><h5> <!-- column 3 heading -->

<p class="indented">line 1</p>
<p class="indented">line 2</p>
<p class="indented">line 3</p>
</h5></td>
</tr>

</table>
</body>
</html>
doogy_64 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 03-23-2009, 07:20 PM   #2 (permalink)
Design Team Member
 
Jaxo's Avatar
 
Join Date: Feb 2008
Location: Deming, NM
Posts: 312
OS: XP SP2 & Vista


Question Re: trouble validating a piece of code

Have you figured it out yet?

If not, are you showing any other errors?

Would be great to have a link to the site to run it through validation myself.

I am wondering if the validation does not like <p> tag withing a headings tag <h5>?

You can always target the <h5> with css to indent it.

Let me know, so we can help you out.

Thanks!
Jaxo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 03-24-2009, 01:53 PM   #3 (permalink)
Registered User
 
Join Date: Mar 2009
Posts: 3
OS: xp sp3


Re: trouble validating a piece of code

Hi

Thanks for the reply. I've come up with a work-around to get it to validate, however, not a very nice solution. I've basically made it print a bullet character with &bull; followed by the text and got away from using the <P> tag. The problem I have now is creating a hanging indent inside the table cell so that when the text wraps at the end of the line it doesn't appear aligned under the bullet. I tried using <ul> with <li></li> and closed with a </ul> which gives me what I want in the browser, but once again it won't validate. Grrr!!

Hmm, just when I was starting to feel a bit more confident with html too!! I guess that's the problem when you try to teach yourself - you don't always know the best way to do things as you don't know what's available!!

Sorry, it's not live yet so no link at this time. Thanks for any help.....
doogy_64 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 03-24-2009, 05:59 PM   #4 (permalink)
Moderator: Design
 
dm01's Avatar
 
Join Date: Oct 2006
Location: Richmond, B.C.; Canada
Posts: 1,464
OS: Windows XP [Version 5.1.2600] SP3 | Ubuntu Jaunty Jackalope | Windows 7 Ultimate (MSDNAA I <3 you)

My System

Re: trouble validating a piece of code

Add this to your CSS:

td.hanging {padding-left: 25px; text-indent: -5px;}

[shift everything over twenty-five pixels, then pull back everything under the first line by five pixels (to create a hanging indent of five pixels).

Then use <td class="hanging"> for the table cells you want as hanging indents.
__________________


Validate your Markup Validate your CSS Notepad++
Please use [html], [php], and [code] when posting code or markup.
I do not help by Private Message or e-mail. If for some reason I have over-looked a reply to a thread that I have previously replied to, then send me a message.
dm01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 03-26-2009, 06:32 PM   #5 (permalink)
Registered User
 
Join Date: Mar 2009
Posts: 3
OS: xp sp3


Re: trouble validating a piece of code

Hi

Thanks very much for that! Now validating.

Cheers!
doogy_64 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
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 Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 12:03 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85