By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,447 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,447 IT Pros & Developers. It's quick & easy.

Menu twice in output but only once in html

P: n/a
Hi,

I have a menu at my page. This menu is at the top of my page and at
the bottom of my page. The html for this menu is the same for the top
menu and for the bottom menu, I only gave them a different id, so that
could position them absolutely in my css:

<div id="menu-top">
<a class="menuitem" href="index.html">menuitem 1</a>
<a class="menuitem" href="page2.html">menuitem 2</a>
<a class="menuitem" href="page3.html">menuitem 3</a>
<a class="menuitem" href="page4.html">menuitem 4</a>
</div>
<div id="menu-bottom">
<a class="menuitem" href="index.html">menuitem 1</a>
<a class="menuitem" href="page2.html">menuitem 2</a>
<a class="menuitem" href="page3.html">menuitem 3</a>
<a class="menuitem" href="page4.html">menuitem 4</a>
</div>

My question is: since the html code for the menu is the same for the
top and the bottom menu, is it possible to put it only once in my html
and then do stuff in css which can make it appear twice on my page?

It seems to me it would be more logical to do it like that, because
the fact that the menu appears only once on the page or that it
appears twice on the page, it pure layout I would say.

Veerle
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Veerle wrote:
Hi,

I have a menu at my page. This menu is at the top of my page and at
the bottom of my page. The html for this menu is the same for the top
menu and for the bottom menu, I only gave them a different id, so that
could position them absolutely in my css:

<div id="menu-top">
<a class="menuitem" href="index.html">menuitem 1</a>
<a class="menuitem" href="page2.html">menuitem 2</a>
<a class="menuitem" href="page3.html">menuitem 3</a>
<a class="menuitem" href="page4.html">menuitem 4</a>
</div>
<div id="menu-bottom">
<a class="menuitem" href="index.html">menuitem 1</a>
<a class="menuitem" href="page2.html">menuitem 2</a>
<a class="menuitem" href="page3.html">menuitem 3</a>
<a class="menuitem" href="page4.html">menuitem 4</a>
</div>

My question is: since the html code for the menu is the same for the
top and the bottom menu, is it possible to put it only once in my html
and then do stuff in css which can make it appear twice on my page?

It seems to me it would be more logical to do it like that, because
the fact that the menu appears only once on the page or that it
appears twice on the page, it pure layout I would say.

Veerle


Not possible. And it is not coming either:
<http://lists.w3.org/Archives/Public/www-style/2003Dec/0007.html> (read
the replies to that message for the reasons).

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.