![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| 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: * 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 |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#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> |
|
|
|
| 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 |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Feb 2008
Location: Deming, NM
Posts: 312
OS: XP SP2 & Vista
|
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!
__________________
|
|
|
|
|
|
#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 • 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..... |
|
|
|
|
|
#4 (permalink) |
|
Moderator: Design
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)
|
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. |
|
|
|
![]() |
| Thread Tools | |
|
|