Welcome Guest!

If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:

  • Receive Fast Advice
  • Learn Programming Languages
  • Get Professional Website Reviews
  • Quick Troubleshooting Assistance

> Xhtml Strict Help

This is a discussion on Xhtml Strict Help, within the HTML/XHTML section. This forum and the thread "Xhtml Strict Help" are both part of the Designing Your Website category.

 
Reply to this topicStart new topic
> Xhtml Strict Help
902
post Mar 25 2008, 09:25 AM
Post #1


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



I'm using this as my doctype..

CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


Now when I validate it's saying that basic tags like <p> and <h1> can't be used inside in-line tags, which in this case would be

CODE
<div id="mainContent">
which is used for the elements of the page content.

Should I be using something other than a div for my layout tags?

Should I be using something other than <p> and <h1>?

Is there something in my doctype that I should change?

Thanks,
Go to the top of the page
 
+Quote Post
karinne
post Mar 25 2008, 09:35 AM
Post #2


Co-Founder
******

Group: Co-Founders
Posts: 2,316
Joined: 13-February 08
From: Squeezin'
Member No.: 2



Could you post your HTML? Or a link to the validator?


--------------------
The Squeeze Store is now OPEN! Come on in and grab something!

a web design portfolio | web non-sense
I'm also on: del.icio.us | flickr | virb | facebook | twitter
The Web Squeeze is also on: virb | facebook | stumbleupon - JOIN IN!
Go to the top of the page
 
+Quote Post
ejg
post Mar 25 2008, 09:41 AM
Post #3


Squeezing
***

Group: Members
Posts: 67
Joined: 14-February 08
Member No.: 86



<div> <p> and <h1> are block-level tags. They take up the whole width available and have a new line before and after.

Tags like <a> <span> and <img> are inline-level tags. They only take up the width of the element and do not force a new line.

You cannot have a block-level tag inside an inline-level tag. For example <a href="example.com">this is my <h1>header</h1></a> is not valid.
Go to the top of the page
 
+Quote Post
902
post Mar 25 2008, 11:05 AM
Post #4


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



Here's the validation page...

Validation for HSPfan
Go to the top of the page
 
+Quote Post
karinne
post Mar 25 2008, 11:07 AM
Post #5


Co-Founder
******

Group: Co-Founders
Posts: 2,316
Joined: 13-February 08
From: Squeezin'
Member No.: 2



You forgot to close all your <p> tags wink.gif


--------------------
The Squeeze Store is now OPEN! Come on in and grab something!

a web design portfolio | web non-sense
I'm also on: del.icio.us | flickr | virb | facebook | twitter
The Web Squeeze is also on: virb | facebook | stumbleupon - JOIN IN!
Go to the top of the page
 
+Quote Post
902
post Mar 25 2008, 11:38 AM
Post #6


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



QUOTE (karinne @ Mar 25 2008, 12:07 PM) *
You forgot to close all your <p> tags wink.gif



huh.gif

Guess I'm used to not closing them... :S

My first shot at x-strict

Thanks, I'll update when I get access.

This post has been edited by 902: Mar 26 2008, 02:47 PM
Go to the top of the page
 
+Quote Post
902
post Mar 26 2008, 02:48 PM
Post #7


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



My css nav won't center in FF but will in IE6. I've read that this can be caused by the doctype puts it in quirks mode.

Is this what's happening here?
Go to the top of the page
 
+Quote Post
karinne
post Mar 26 2008, 03:49 PM
Post #8


Co-Founder
******

Group: Co-Founders
Posts: 2,316
Joined: 13-February 08
From: Squeezin'
Member No.: 2



What's the site?


--------------------
The Squeeze Store is now OPEN! Come on in and grab something!

a web design portfolio | web non-sense
I'm also on: del.icio.us | flickr | virb | facebook | twitter
The Web Squeeze is also on: virb | facebook | stumbleupon - JOIN IN!
Go to the top of the page
 
+Quote Post
902
post Mar 26 2008, 04:03 PM
Post #9


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



QUOTE (karinne @ Mar 26 2008, 04:49 PM) *
What's the site?

hspfan.com
Go to the top of the page
 
+Quote Post
karinne
post Mar 26 2008, 06:11 PM
Post #10


Co-Founder
******

Group: Co-Founders
Posts: 2,316
Joined: 13-February 08
From: Squeezin'
Member No.: 2



In your #navigation ul { } change the margin: 0; to margin: auto;


--------------------
The Squeeze Store is now OPEN! Come on in and grab something!

a web design portfolio | web non-sense
I'm also on: del.icio.us | flickr | virb | facebook | twitter
The Web Squeeze is also on: virb | facebook | stumbleupon - JOIN IN!
Go to the top of the page
 
+Quote Post
902
post Mar 26 2008, 08:49 PM
Post #11


Squeezing
***

Group: Members
Posts: 65
Joined: 14-February 08
Member No.: 100



I was hoping it was something simple.

Worked great.

Thanks again.
Go to the top of the page
 
+Quote Post
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   12 902 156 23rd February 2008 - 11:27 AM
Last post by: karinne
No New Posts   2 jamesicus 108 10th March 2008 - 03:59 PM
Last post by: jamesicus
No New Posts   10 Itsumishi 198 11th May 2008 - 04:47 AM
Last post by: MikeHopley