![]() |
|
|
|||||||
![]() |
HTML - <div class="section" id="menu"> or <div class="subsection" id="menu"> |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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 |
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
|
|
#4 |
|
Posts: n/a
|
"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 |
|
|
|
#5 |
|
Posts: n/a
|
"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 |
|