IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
2 Pages V   1 2 >  
Reply to this topicStart new topic

Div Layer Help

, Help me get css to not suck

galexcd
no avatar
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********
Group: [HOSTED]
Posts: 1,206
Joined: 25-September 05
From: Los Angeles, California
Member No.: 12,251
myCENT:25.62



Post #1 post May 13 2008, 09:34 PM
Alright 20 credits goes to the first person to successfully solve my problem.

I need a div layer who's position is absolute to be 100 pixels from the top of the window and 0 pixels from the bottom without it going over. I have lost all faith in CSS because it cannot do this simple task that I require it to do.

Bonus points if you can get it to work on a div layer who's width isn't fixed.

EDIT: oh yeah It has to work in all browsers too...

This post has been edited by galexcd: May 13 2008, 09:34 PM
Go to the top of the page
+Quote Post
kobra500
no avatar
Super Member
*********
Group: [HOSTED]
Posts: 444
Joined: 8-January 08
From: UK - Kent
Member No.: 55,950
myCENT:28.33



Post #2 post May 13 2008, 09:39 PM
QUOTE
HAHA this is a first Alex needs help with a code... I'm only laughing mind cos I'm jealous and I too would not be able to do this but I get my laughs anyway (quoted since does not deserve credits and could be considered spam)


This post has been edited by kobra500: May 13 2008, 09:41 PM
Go to the top of the page
+Quote Post
galexcd
no avatar
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********
Group: [HOSTED]
Posts: 1,206
Joined: 25-September 05
From: Los Angeles, California
Member No.: 12,251
myCENT:25.62



Post #3 post May 13 2008, 09:52 PM
QUOTE
HAHA this is a first Alex needs help with a code...


Ehh... not exactly the first time. You should read some of my early topics when I was a little noob programmer and didn't really know anything. But anyway, I wouldn't really consider css as a programming language, or even as "code". Its more like "annoying text that makes your page not suck as much when you can get it to work but otherwise is just a pain in the..." well you get the idea.
Go to the top of the page
+Quote Post
kobra500
no avatar
Super Member
*********
Group: [HOSTED]
Posts: 444
Joined: 8-January 08
From: UK - Kent
Member No.: 55,950
myCENT:28.33



Post #4 post May 13 2008, 10:09 PM
I agree... if it were efficient I would sit down and use tables since they're easy but problem is you cant always do what you need to do!
Go to the top of the page
+Quote Post
sonesay
no avatar
|||[ n00b King ]|||
*********
Group: [HOSTED]
Posts: 732
Joined: 20-June 07
From: Auckland
Member No.: 45,102
myCENT:7.62



Post #5 post May 13 2008, 11:28 PM
You need an expandable div that is set to limit of being 100pixels from the top of the window and goes all the way to the bottom? Sorry trying to make sure I understand correctly
Go to the top of the page
+Quote Post
galexcd
no avatar
Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
***********
Group: [HOSTED]
Posts: 1,206
Joined: 25-September 05
From: Los Angeles, California
Member No.: 12,251
myCENT:25.62



Post #6 post May 14 2008, 12:33 AM
QUOTE(sonesay @ May 13 2008, 04:28 PM) [snapback]389285[/snapback]
You need an expandable div that is set to limit of being 100pixels from the top of the window and goes all the way to the bottom? Sorry trying to make sure I understand correctly


Yes thats exactly what I need. If you can make me something that works in all browsers to do this then you can have my 20 credits.
Go to the top of the page
+Quote Post
coolcat50
no avatar
Super Member
*********
Group: Members
Posts: 298
Joined: 5-October 07
From: Random Places
Member No.: 51,171
Spam Patrol
myCENT:30.84



Post #7 post May 14 2008, 03:34 AM
This sounds like you need some Javascript to insert dynamic CSS into the page and use AJAX to reload the page whenever the window size is changed. Or CSS I believe can do the trick. I know that you can stack another 100px div on top as a filler and have the other with a height of the rest of the window.
Go to the top of the page
+Quote Post
sonesay
no avatar
|||[ n00b King ]|||
*********
Group: [HOSTED]
Posts: 732
Joined: 20-June 07
From: Auckland
Member No.: 45,102
myCENT:7.62



Post #8 post May 14 2008, 07:44 AM
This sounds like a challenge but I don't think I will be attempting this anytime soon. I've come across articles dealing with using JS to dynamically alter layouts on window resizing by the user but never looked into it. There would be no need for AJAX as JS alone should be enough since its all happening on the client side. If anyone comes up with a solution let us see!


Go to the top of the page
+Quote Post
coolcat50
no avatar
Super Member
*********
Group: Members
Posts: 298
Joined: 5-October 07
From: Random Places
Member No.: 51,171
Spam Patrol
myCENT:30.84



Post #9 post May 14 2008, 03:34 PM
Well, here is a small code that could do it. I am not sure if it works in all browsers. Check it. It uses a margin to lower it by 100px.

CSS:
CODE
* { padding: 0 0 0 0; }
//Must set padding to 0 for Opera.

body {
//Set top margin to be 100px
margin-top:100px;
//Set rest of margins to be 0
margin-left:0px;
margin-right:0px;
margin-bottom:0px;
}

.lowereddiv {
//Set height to fill rest of page
height:100%
}



Go to the top of the page
+Quote Post
jlhaslip
no avatar
A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon
Group: [MODERATOR]
Posts: 4,327
Joined: 24-July 05
From: Linix, DOS and Windows…the good, the bad and the ugly
Member No.: 9,787
Spam Patrol
myCENT:15.40



Post #10 post May 14 2008, 03:48 PM
I don't have time to work with the code, but check this out:

http://www.webmasterworld.com/forum91/3429.htm
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 0 BaseElement 996 29th June 2005 - 11:43 AM
Last post by: BaseElement
No new   22 keego 1,138 19th December 2007 - 04:48 PM
Last post by: keego
No New Posts 2 Darren0330 500 8th July 2005 - 11:54 PM
Last post by: Saint_Michael
No New Posts   1 patelg 541 22nd September 2005 - 01:14 AM
Last post by: arboc7
No New Posts   1 kvarnerexpress 474 5th February 2006 - 06:17 AM
Last post by: kvkv
No New Posts   0 Avalon 2,279 3rd April 2006 - 02:26 PM
Last post by: Avalon
No New Posts   5 Saint_Michael 881 26th October 2008 - 07:11 PM
Last post by: Running With Scissors
No New Posts   2 nirmaldaniel 331 15th October 2008 - 11:45 AM
Last post by: iGuest-
No New Posts   2 moutonoir 108 10th November 2008 - 08:38 PM
Last post by: moutonoir


 



RSS