Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - <div class="section" id="menu"> or <div class="subsection" id="menu">

 
Thread Tools Search this Thread
Old 05-22-2006, 05:22 PM   #1
Default <div class="section" id="menu"> or <div class="subsection" id="menu">


Hello,
I tried to include the menu on different pages using
<?php include_once "menu-italiano.html"; ?>
or whatever the menu is called depending on the language.
The menu is inserted on pages which already have a main heading with
a <div class="section" id="...">
Now the problem is that I would like to use a model where the main heading
of the menu is not as much important as the main heading of the whole page
and the menu is regarded as just a part of it. Therefore I thought that I
would use <div class="subsection" id="menu">
However the html file menu-italiano.html does not validate
http://www.htmlhelp.com/cgi-bin/vali...l&warnings=yes
Now I wonder:
whether I should add the document type declaration even if it is a file
which is included and which place in the hierarchy the first <div class> in
the menu should have, the first (section) or the second (subsection)?
The former would suit the inserted html document as such but the latter
would suite the structure of the whole main page where the menu is inserted,
wouldn´t it?


--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/
Write in peace for peace




Luigi Donatello Asero
  Reply With Quote
Old 05-22-2006, 05:54 PM   #2
Jonathan N. Little
 
Posts: n/a
Default Re: <div class="section" id="menu"> or <div class="subsection" id="menu">

Luigi Donatello Asero wrote:
> Hello,
> I tried to include the menu on different pages using
> <?php include_once "menu-italiano.html"; ?>
> or whatever the menu is called depending on the language.
> The menu is inserted on pages which already have a main heading with
> a <div class="section" id="...">
> Now the problem is that I would like to use a model where the main heading
> of the menu is not as much important as the main heading of the whole page
> and the menu is regarded as just a part of it. Therefore I thought that I
> would use <div class="subsection" id="menu">
> However the html file menu-italiano.html does not validate
> http://www.htmlhelp.com/cgi-bin/vali...l&warnings=yes


Whoah! First read the error message! 'section' vs 'subsection' has
nothing to do with the error:

Line 1, character 1:
<div class"subsection" id="menu">
^
There is you error, no '=' should be

<div class="subsection" id="menu">

> Now I wonder:
> whether I should add the document type declaration even if it is a file
> which is included and which place in the hierarchy the first <div class> in
> the menu should have, the first (section) or the second (subsection)?
> The former would suit the inserted html document as such but the latter
> would suite the structure of the whole main page where the menu is inserted,
> wouldn´t it?
>
>



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Reply With Quote
Old 05-22-2006, 06:11 PM   #3
Martin Jay
 
Posts: n/a
Default Re: <div class="section" id="menu"> or <div class="subsection" id="menu">

In message <xzlcg.1322$>, Luigi Donatello Asero
<> writes

>However the html file menu-italiano.html does not validate
>http://www.htmlhelp.com/cgi-bin/vali...%2F%2Fwww.scai
>ecat-spa-gigi.com%2Fit%2Fmenu-italiano.html&warnings=yes
>Now I wonder:
>whether I should add the document type declaration


Why not validate it as part of document it's included in?

Let's say index.php includes menu-italiano.html. Validate index.php and
menu-italiano.html is validated at the same time.

You can't have two document type declaration in the same HTML document.

I prefer to put menus at the top of the HTML document, something like
this:

<h1>Main heading</h1>

<div class="menu">
<h2>Menu</h2>
<ul>
<li>Menu item</li>
<li>Menu item</li>
<li>Menu item</li>
</ul>
</div>

<div class="main_text">
<h2>Document text</h2>
<p>Blah, blah, blah...</p>
</div>
--
Martin Jay
  Reply With Quote
Old 05-22-2006, 06:22 PM   #4
Luigi Donatello Asero
 
Posts: n/a
Default Re: <div class="section" id="menu"> or <div class="subsection" id="menu">


"Jonathan N. Little" <> skrev i meddelandet
news:4471ebca$0$3682$.. .
> Luigi Donatello Asero wrote:
> > Hello,
> > I tried to include the menu on different pages using
> > <?php include_once "menu-italiano.html"; ?>
> > or whatever the menu is called depending on the language.
> > The menu is inserted on pages which already have a main heading with
> > a <div class="section" id="...">
> > Now the problem is that I would like to use a model where the main

heading
> > of the menu is not as much important as the main heading of the whole

page
> > and the menu is regarded as just a part of it. Therefore I thought that

I
> > would use <div class="subsection" id="menu">
> > However the html file menu-italiano.html does not validate
> >

http://www.htmlhelp.com/cgi-bin/vali...l&warnings=yes
>
> Whoah! First read the error message! 'section' vs 'subsection' has
> nothing to do with the error:
>
> Line 1, character 1:
> <div class"subsection" id="menu">
> ^
> There is you error, no '=' should be
>
> <div class="subsection" id="menu">



You are right.
I made a mistake (certainly not the first and probably and unfortunately not
the last...)

--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/
Write in peace for peace


  Reply With Quote
Old 05-22-2006, 06:26 PM   #5
Luigi Donatello Asero
 
Posts: n/a
Default Re: <div class="section" id="menu"> or <div class="subsection" id="menu">


"Martin Jay" <> skrev i meddelandet
news:...
> In message <xzlcg.1322$>, Luigi Donatello Asero
> <> writes
>
> >However the html file menu-italiano.html does not validate
> >http://www.htmlhelp.com/cgi-bin/vali...%2F%2Fwww.scai
> >ecat-spa-gigi.com%2Fit%2Fmenu-italiano.html&warnings=yes
> >Now I wonder:
> >whether I should add the document type declaration

>
> Why not validate it as part of document it's included in?
>
> Let's say index.php includes menu-italiano.html. Validate index.php and
> menu-italiano.html is validated at the same time.
>
> You can't have two document type declaration in the same HTML document.


No, I cannot. So the only way seems to try and validate only the main
document which includes the menu as well.
Now https://www.scaiecat-spa-gigi.com/it/benvenuti.php validates

> I prefer to put menus at the top of the HTML document, something like
> this:
>
> <h1>Main heading</h1>
>
> <div class="menu">
> <h2>Menu</h2>
> <ul>
> <li>Menu item</li>
> <li>Menu item</li>
> <li>Menu item</li>
> </ul>
> </div>
>
> <div class="main_text">
> <h2>Document text</h2>
> <p>Blah, blah, blah...</p>
> </div>
> --


Well, I have a <div class="subsection" id="head">
in between with a kind of introduction.

--
Luigi Donatello Asero
https://www.scaiecat-spa-gigi.com/
Write in peace for peace


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump