Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 8th, 2005, 5:16 PM   #1
dmorales
Programmer
 
Join Date: Feb 2005
Posts: 74
Rep Power: 4 dmorales is on a distinguished road
How do I make a fixed window?

How would I make a window a fixed size with css?

oh and maybe someone could take the time to explain how to use relative positioning. Thanks!
dmorales is offline   Reply With Quote
Old Apr 8th, 2005, 7:12 PM   #2
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Quote:
How would I make a window a fixed size with css?
CSS can't do this kind of thing, so you don't; you use JavaScript. It can resize the browser window. I'm not sure if you can make the current window non-resizeable - I think you can with popups. Hope someone can clarify.

Quote:
oh and maybe someone could take the time to explain how to use relative positioning. Thanks!
Sure. Relative position in CSS places the object relative to where it would appear.
Say i've got a paragraph that appears 200px down the page (because there is other content above or whatever). I can set the position property to relative and then specify it's relative distance using the top, left, bottom, and right properties.
Lets say I set the positioning to relative and then specify top as 20px:
<p style="position: relative; top: 20px">
The paragraph will now appear with the top 20px away from where it should appear, so in our case 220px down the page.
Understand?
Cerulean is offline   Reply With Quote
Old Apr 9th, 2005, 12:57 PM   #3
dmorales
Programmer
 
Join Date: Feb 2005
Posts: 74
Rep Power: 4 dmorales is on a distinguished road
thanks, makes sense. So if I had a page like this:
11122222222111
11122222222111
11155333333
11155333333
11155333333
11155333333
5=nav bar
2=header
1=whitespace
3=content

I want to position the navigation bar right where it is in relation to the header, which is inthe center of the page I see how I could set the top position f it to be constant,but how would I specify the horizntal position?
dmorales is offline   Reply With Quote
Old Apr 9th, 2005, 2:04 PM   #4
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
Well you don't want relative positioning if you know exactly where you want your div or other element to be, in relation to the top-left corner (or bottom-right, or whatever) of the screen. You just use absolute positioning. To position a div 10px from the top of the screen and 20px from the left, no matter of it's placement in the HTML file, just use:
position: absolute;
left: 20px;
top: 10px;
But there are better ways to go about a 2-column layout with a header and footer. Google for "2 column CSS layout" and you'll get tonnes of examples.
Have fun
Cerulean is offline   Reply With Quote
Old Apr 10th, 2005, 1:38 PM   #5
dmorales
Programmer
 
Join Date: Feb 2005
Posts: 74
Rep Power: 4 dmorales is on a distinguished road
cool! Thanks, at least I know what to search uder now.
dmorales is offline   Reply With Quote
Old Apr 25th, 2005, 11:14 AM   #6
MonkeyRevolution
Programmer
 
MonkeyRevolution's Avatar
 
Join Date: Apr 2005
Location: In the toaster. Shh!
Posts: 57
Rep Power: 4 MonkeyRevolution is on a distinguished road
Send a message via AIM to MonkeyRevolution Send a message via MSN to MonkeyRevolution Send a message via Yahoo to MonkeyRevolution
Dunno if you've figured this out yourself, but this is one of the few things I can answer! WHEE!!

This goes up in the header section:
<SCRIPT LANGUAGE="JavaScript">

        function myvoid()
        {}
function CreateChild(CoverLocation)
        {
                window.open (CoverLocation, 'newWin', 'scrollbars=yes,status=yes,width=600,height=500,resizable=yes');
                return false;
        }

</SCRIPT>

And this is what your link to your new window should look like:
<a href="javascript:myvoid()" onClick="CreateChild('gallery/fullcircle.html');" onMouseOver= 
   "window.status='Full Circle'; return true"><img src="gallery/thumbnails/fc-tn.jpg"></a>

(I'm just copying/pasting from my website, so I hope it's legible...if not, I'll be happy to clarify)

I think that's all you need...
__________________
I had a dream that Triumph the Insult Dog owned Microsoft...

How...appropriate.

Last edited by MonkeyRevolution; Apr 25th, 2005 at 11:18 AM.
MonkeyRevolution is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC