Log in

View Full Version : Website coding help needed


Tottanka
04-01-2007, 23:43
Ok..i wanna make a panel for ouw team's website.
It's abasicly a frame, but i want it to be in the upper right corner of the window, lets say, taking 20%in width and 10% in height...
And i want it to freeze on the window, meaning that when the user will scroll down. it will move along and he will still be able to see it..
Anyone of u guys know how to do it?

JBotAlan
04-01-2007, 23:48
You want CSS.

Go to http://www.w3schools.com/ and read the CSS tutorial. I hope you aren't using Dreamweaver or (shudders) Frontpage.

I don't know it very well, but a position: absolute should do it (look it up)

JBot

EDIT: Here's the page you are looking for: http://www.w3schools.com/css/pr_class_position.asp
You will need to learn a little about CSS syntax, though.

Googling CSS position tutorial gave a few results:
http://www.brainjar.com/css/positioning/
http://www.tizag.com/cssT/position.php
http://www.yourhtmlsource.com/stylesheets/csslayout.html

IMPORTANT: You have to know, what you want to do will not be very easy to make work in IE6 and back. Supposedly IE7 parses CSS correctly, but I can tell you from personal experience that a position: absolute does not work in IE6.

Tottanka
04-01-2007, 23:57
I still cant find there how to make it freeze there and move along while you scroll..ive seen it in many wevsites...
ill find u an example

EDIT:
ok, ive lloked in some websites and foud that it is used in many of them for advertisment..but its a Flash file in the side of the screen
Any1 knows how do that?

Christian
05-01-2007, 00:13
You can do it using frameset, but I personally don't like frames...
What you want is fixed position.

On your page, you need to place a div, or other block element, and give it an id:

<div id="fxid"> Information will go in here. </div>

and then on your CSS stylesheet, include:

#fxid {
position:fixed;
top:20%;
left:0;
height:100px;
/* I don't like making height dynamic so in this example, I assigned it a value */
}

You can change the "fxid" to whatever you want, but you have to keep the pound sign (#) in the CSS stylesheet.

The only problem is that the position:fixed does not work in IE (I haven't tried on IE7). So you may want to go with framesets. Or, you can use some fancy JavaScript (http://cross-browser.com/x/menus/xmenu2.html) to get it to "float" where you want it. We used it one year to create a OSX-ish type navigation that always stayed on the bottom of the screen. He also has a version that mimics fixed position
(http://cross-browser.com/x/examples/floater_fixed.html).

Search w3schools (http://w3schools.com/) for information on CSS, JavaScript, or framesets if you want to do more or differently.

Tottanka
05-01-2007, 03:56
OK...
i have worked on that little button Since posting till nnow and i finnaly got it uploaded and everything...
here it is, on our main page and all...
www.frc-1947.com

JBotAlan
05-01-2007, 07:22
I see what you have working now is Javascript. That is probably the best solution for now, aside from requiring a *standards compliant* browser...

JBot