February 15, 201115 yr Hi! Im building my website and Im using a Horizontal Menubar and wonder wich of the 2 following is best to use: 1. Two horizontal frames (one with the Menubar and the other with the content depending on wich button you click on the Menubar) 2. or if its better to have diffrent html-pages to link to depending och wich button you click on the Menubar. One friend told me some day ago that frames are old..? But I dont really trust him. Im pretty new to webdeveloping, so I want answere from someone who knows. Thank you!
February 15, 201115 yr Don't use frames. There are a couple of problems with frames, but they mostly boil down to the same thing: you want your individual pages to get linked to and bookmarked, but if you use frames it's the frameset page that gets linked, not your content pages.
February 15, 201115 yr Author Ok, how is it then with the Menubar, if I want to have a diffrent color on the button I have choosen. Isnt it diffrent Menubars in every page in that case? My html in every page: <ul id="My_menu" class="MenuBarHorizontal"> <li><a href="about_us.html">About us</a> </li> <li><a href="why_us.html">Why us</a></li> <li><a href="references.html">References</a> </li> <li><a href="Contact.html">Contact</a></li> </ul>
February 15, 201115 yr Nope. Give a class to the body, and a matching class to the menu item for that page. You can target each of them in your stylesheet with: body.about li.about { background-color: red; } body.home li.home { background-color: green; }
Create an account or sign in to comment