Style Sheet Question

admin

Administrator
Staff member
Hey,<br />
I have been working with this cascading style sheet for a while. I want to use a variable for one of the parameters in my style sheet, the top variable, so that my menu can be seen even if you scrool down. I am probably going to use the content variable. Should I add this content tag to the style sheet list, or in the div itself?? Any examples??<br />
<br />
Thanks a ton.<br />
Matt<!--content-->as far as I know style sheets can't use variables.<!--content-->if you want a menu to be seen while you scroll down the content, why not use a frame or iframe?<br />
<br />
<br />
<HTML><br />
<HEAD><br />
..<br />
</HEAD><br />
<br />
<FRAMESET ROWS="150, *" FRAMEBORDER="0"><br />
<FRAME NAME="nav_bar" SRC=http://www.htmlforums.com/archive/index.php/"nav_bar.html" SCROLLING="no"><br />
<br />
<FRAMESET COLS="75, *" FRAMEBORDER="0"><br />
<FRAME NAME="side_bar" SRC=http://www.htmlforums.com/archive/index.php/"side_bar.html"><br />
<FRAME NAME="main" SRC=http://www.htmlforums.com/archive/index.php/"home_page.html"><br />
</FRAMESET><br />
</FRAMESET><br />
</HTML><br />
<br />
<br />
This the creates a multi-page window that looks like the attached file in my next post.<br />
<br />
<br />
<br />
NOTE:<br />
to keep loading the content into the "main" frame, instead of opening a new window, the links in the "nav_bar" and "side_bar" files need to be slightly modified.<br />
<br />
<br />
<A HREF=http://www.htmlforums.com/archive/index.php/"content.html" TARGET="main">CLICK ME</A><br />
<br />
<br />
for more information on frames and linking them I recomend <br />
<!-- w --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/alist.html">www.htmlhelp.com/reference/html40/alist.html</a><!-- w --> (<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/alist.html">http://www.htmlhelp.com/reference/html40/alist.html</a><!-- m -->)<br />
<br />
<br />
Hope this helps you<!--content-->The page layout from the <FRAMESET> code in my last post<!--content-->That would definitely work, and I like the idea, but the setup for the site I am designing has a horizontal navbar at the top of the page, and it kind of has to stay that way. This is why I run into the problem, because it appear at the top of the page, and is not visible if the page is scrolled down. I have the variable setup so it figures out where exactly to place it:<br />
<br />
top.window.frames[2].document.body.scrollTop + 5<br />
<br />
I just can't figure out where to place it so that I can get my div layer, which is initially set to hidden, visible at that point.<!--content-->they make menu bars that go along the top that scroll down with you as you scroll. one is called CoolMenu (<!-- m --><a class="postlink" href="http://www.dhtmlcentral.com/projects/coolmenus/?m=10">http://www.dhtmlcentral.com/projects/coolmenus/?m=10</a><!-- m -->) . it will do exactly as you want.<!--content-->I will look into that, but I would like to try and modify my menu. Thanks for the help.<br />
<br />
Matt<!--content-->or you could split the page into the nav bar and content?<br />
<br />
the code I typed was a basic example of how frames could be used to have a static menus and moveable content. they can be arranged in anyway you want.<br />
<br />
btw: in the <FRAMESET> declaration I use ROWS and COLS and some values. Basically, with ROWS="150, *" I created a top row 150 pixels high, and then had the second fill in any extra space in the window.<br />
<br />
Alternatively, I could use<br />
<br />
<FRAMESET ROWS="25%, 30%, *"><br />
<br />
<br />
the top row occupies 25% of the window<br />
the next row 30%<br />
and the last row fills in the rest of the window (45%)<br />
<br />
I like framesets, because I can use them for the reasons above as well as for some other crafty little solutions. I realise that there is a small overhead involved, due to the extra file you need to collate all the content pages, but I think that it is well worth it if the <FRAMESET> is well executed.<!--content-->Yeah, I actually have my page broken up into a frameset, and am actually in the process of makign the countless content pages. I have it split up into three frames, and the middle one has the nav bar, with the top having the logo and the bottom having the content. I want the menu to display at the top of the third frame, regardless of if I have scrolled down.<!--content-->Ahh - I think I understand. Do you have a nav-bar for the site, and then a menu on each page? If that is the case, then I think maybe Scoutt's CoolMenu would be a good idea.<!--content-->Nah, I only have one main nav bar with links to every page on the site. This navbar stays constant, with menus dropping down for the according subjects and topic areas. This navbar is in the second frame.<!--content-->In the <FRAME> declaration put SCROLLING="no" into the first two frames, then SCROLLING="auto" in the third frame:<br />
<br />
<br />
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"x.html" NAME="x" SCROLLING="no"><br />
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"y.html" NAME="y" SCROLLING="no"><br />
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"z.html" NAME="z" SCROLLING="auto"><br />
<br />
<br />
then they should only be able to scroll the content in the bottom frame, and the other two frames will stay visible.<!--content-->Ha, I must be awful at explaining this, sorry for any confusion...I have the top two set so that they dont scroll, they work fine. But the second frame that doesnt scroll is the navbar. I am having a problem with my menus. When I scroll down on the content pane, the third frame, and I roll over the nav bar which is in the second frame, the menus are only visible if I scroll back up to the top of the third frame. I was hoping to set the variable I listed above as the top variable in the style sheet, so that it would output it whenere the third page had been scrolled to, but I guess that wont work.<!--content-->sorry - I just can't visualise the problem. i am not currently html'ing and have my CAD hat on right now - Tech Support in my place covers the whole range of the company - fun but confusing.<br />
<br />
so, the menu from the second frame opens into the third frame? is this right?<br />
I am very confused by this:confused: :confused: :confused: :confused: <br />
<br />
if this is the case then I cannot think of anything else, except perhaps to try that CoolMenu script. Although I don't know if that is easy to use - I am not that au fait with scripts and the like yet.<!--content-->Yeah, the menu shows up in the third frame, I think you got the idea now. Well, thanks anyway for your effort. Good luck with the CAD :D<!--content-->then next week it will be firmware programming, then a bit of hardware upgrades, then a bit of software upgrades, then more html, more CAD, then installing a big electrical panel into our building - like i said, fun but confusing<!--content-->HueJorgan, is the menu in the 3rd frame the same all the time? I mean is it the same for all pages in that frame? also is it in tables or such. I think there might be a way to make it dynamic and make it scroll with you as the page scrolls. let me see if I can find it.<!--content-->Yes, the menu always shows up in the third frame, and I am using tables with alterring the visibility tag on the div items. Each menu has its own div, and its own visibility.<!--content-->then you could try this<br />
<br />
<!-- m --><a class="postlink" href="http://members.aol.com/grassblad/dHTML/scrollDiv.html">http://members.aol.com/grassblad/dHTML/scrollDiv.html</a><!-- m --><!--content-->I will take a look, thanks<!--content-->
 
Back
Top