Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > XHTML and nested divs

Reply
Thread Tools

XHTML and nested divs

 
 
dbunder
Guest
Posts: n/a
 
      12-20-2003

I'm currently designing a site and I want to conform of XHTML standard
(transitional). On a few parts of my site I need to use nested di
tags. XHTML does not allow this for some reason. Is there another wa
I could write something like

<div class="content"> <!--container tag-->
<div class="contentheader"><!--header tag with border-->
a header
</div>
</div>

I've not kept up with HTML or stylesheets for the past few years so I'
kinda rusty. Thanks for any help

dbunde
-----------------------------------------------------------------------
Posted via http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread: http://www.forum4designers.com/message23763.htm

 
Reply With Quote
 
 
 
 
Leif K-Brooks
Guest
Posts: n/a
 
      12-20-2003
dbunder wrote:
> I'm currently designing a site and I want to conform of XHTML standards
> (transitional). On a few parts of my site I need to use nested div
> tags. XHTML does not allow this for some reason. Is there another way
> I could write something like
>
> <div class="content"> <!--container tag-->
> <div class="contentheader"><!--header tag with border-->
> a header
> </div>
> </div>


That should be perfectly valid (although the div.content header should
probably be a <h#>). There's probably something else on the page that's
invalid, URL?

 
Reply With Quote
 
 
 
 
John McGaw
Guest
Posts: n/a
 
      12-20-2003
"dbunder" <(E-Mail Removed)4designers.com> wrote in message
news:(E-Mail Removed)4designers.com...
>
> I'm currently designing a site and I want to conform of XHTML standards
> (transitional). On a few parts of my site I need to use nested div
> tags. XHTML does not allow this for some reason. Is there another way
> I could write something like
>
> <div class="content"> <!--container tag-->
> <div class="contentheader"><!--header tag with border-->
> a header
> </div>
> </div>
>
> I've not kept up with HTML or stylesheets for the past few years so I'm
> kinda rusty. Thanks for any help!
>
>
> dbunder
> ------------------------------------------------------------------------
> Posted via http://www.forum4designers.com
> ------------------------------------------------------------------------
> View this thread: http://www.forum4designers.com/message23763.html
>

Don't know what your problem is but nested DIVs are perfectly legal. I just
got done changing my old site over to XHTML 1.1, which is by default strict
and has no relaxed standards. Every page is chock full of nested DIVs,
usually two deep but sometimes three or more from what I remember, and it
W3C certifies just fine Can't claim that it is a work of art but it even
works fine and looks about the same in every modern browser I have access
to.
--
John McGaw
[Knoxville, TN, USA]

Return address will not work. Please
reply in group or through my website:
http://johnmcgaw.com

 
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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
swapping divs -- when divs NOT positioned absolutely.. maya Javascript 4 11-16-2007 05:11 PM
Managing divs within divs.... rich HTML 0 02-02-2006 07:38 PM
'clear' inside of nested divs Jens Lenge HTML 22 03-15-2005 01:21 PM
nested divs - newbie question Bernd Liebermann HTML 2 12-17-2004 08:24 PM
Nested DIVs - is there a better way? Guadala Harry ASP .Net 2 10-26-2004 07:30 PM



Advertisments