Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Trouble structuring my site

Reply
Thread Tools

Trouble structuring my site

 
 
zacariaz@gmail.com
Guest
Posts: n/a
 
      09-23-2007
Imagine this:
The site layout is split in three parts: 'top', 'middle' and 'bottom'.
all three parts are 100% width, 'top' and 'bottom' are x pixels high
and middle hight is to fill the rest of the page. Standard scrolling
is disabled and 'middle' is set to (css) 'overflow:auto'.
Problems:
1. i can't get the structure right without using table, but tables are
not my favorit solution and it seems to me that it should be possible
doing it just with 'div' tags and css.
2. I have been unable to specify a doctype which allows (css)
'overflow', all though it works without a doctype.
3. (css) 'overflow' doesn't work, with or without doctype, in 'Mozilla
Firefox'.

I have tried over nad over again, i've asked at various forums etc.
but seemingly there is not solution to the problem... I refuse to
accept that.

I hope you can help.


Regards

 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      09-23-2007
On 2007-09-23, wrote:
> Imagine this:
> The site layout is split in three parts: 'top', 'middle' and 'bottom'.
> all three parts are 100% width, 'top' and 'bottom' are x pixels high
> and middle hight is to fill the rest of the page. Standard scrolling
> is disabled and 'middle' is set to (css) 'overflow:auto'.
> Problems:


The problems are stated clearly in your first paragraph.

You have no idea what anyone's browser window look like. Setting a
height in pixels (for anything other than a fixed-size object like
an image) is doomed to failure.

> 1. i can't get the structure right without using table, but tables are
> not my favorit solution and it seems to me that it should be possible
> doing it just with 'div' tags and css.


It is possible. You are trying to do the wrong thing.

> 2. I have been unable to specify a doctype which allows (css)
> 'overflow', all though it works without a doctype.


It works in HTML 4.01 strict.

> 3. (css) 'overflow' doesn't work, with or without doctype, in 'Mozilla
> Firefox'.


It works in my Firefox browser.

> I have tried over nad over again, i've asked at various forums etc.
> but seemingly there is not solution to the problem... I refuse to
> accept that.


Post a URL demonstrating the problem.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
Reply With Quote
 
 
 
 
zacariaz@gmail.com
Guest
Posts: n/a
 
      09-23-2007
On 23 Sep., 09:47, "Chris F.A. Johnson" <cfajohn...@gmail.com> wrote:
> On 2007-09-23, zacar...@gmail.com wrote:
> > Imagine this:
> > The site layout is split in three parts: 'top', 'middle' and 'bottom'.
> > all three parts are 100% width, 'top' and 'bottom' are x pixels high
> > and middle hight is to fill the rest of the page. Standard scrolling
> > is disabled and 'middle' is set to (css) 'overflow:auto'.
> > Problems:

>
> The problems are stated clearly in your first paragraph.
>
> You have no idea what anyone's browser window look like. Setting a
> height in pixels (for anything other than a fixed-size object like
> an image) is doomed to failure.
>

I know for a fact that it is possible with the use of tables, an
example:
http://www.zacariazdisciples.net/g33kz%2Dinn/ (doesnt work as i have
specified doctype, but it should be clear from the code)

> > 1. i can't get the structure right without using table, but tables are
> > not my favorit solution and it seems to me that it should be possible
> > doing it just with 'div' tags and css.

>
> It is possible. You are trying to do the wrong thing.
>

Yes, but it seems to me that if it is possible in tables it should
allso be possible by the use of divs, but maybe im mistaken.

> > 2. I have been unable to specify a doctype which allows (css)
> > 'overflow', all though it works without a doctype.

>
> It works in HTML 4.01 strict.
>

this is the doctype i am currently using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
If this is correct, im really confused, assuming you are correct of
course.

> > 3. (css) 'overflow' doesn't work, with or without doctype, in 'Mozilla
> > Firefox'.

>
> It works in my Firefox browser.
>

well it doesnt in mine, but it may allso have to do with the fact that
i this havent solved the doctype problem.

> > I have tried over nad over again, i've asked at various forums etc.
> > but seemingly there is not solution to the problem... I refuse to
> > accept that.

>
> Post a URL demonstrating the problem.
>

http://www.zacariazdisciples.net/g33kz%2Dinn/index.htm
http://www.zacariazdisciples.net/g33kz%2Dinn/layout.jpg (what it is
suposed to look like and does in IE without specityed doctype)
> --
> Chris F.A. Johnson <http://cfaj.freeshell.org>
> ================================================== =================
> Author:
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)



 
Reply With Quote
 
zacariaz@gmail.com
Guest
Posts: n/a
 
      09-23-2007
edit:
>>> It is possible. You are trying to do the wrong thing.

>>
>>Yes, but it seems to me that if it is possible in tables it should
>>allso be possible by the use of divs, but maybe im mistaken.


I read that wrong.
What you are saying here is contradiction it self.
1. you say it is possible.
2. you say im trying to do the wrong thing, e.g. its not possible? or
do you mean that i am using the wrong methode? In than case i would
like to know how.

 
Reply With Quote
 
J.O. Aho
Guest
Posts: n/a
 
      09-23-2007
wrote:
> On 23 Sep., 09:47, "Chris F.A. Johnson" <cfajohn...@gmail.com> wrote:
>> On 2007-09-23, zacar...@gmail.com wrote:
>>> Imagine this:
>>> The site layout is split in three parts: 'top', 'middle' and 'bottom'.
>>> all three parts are 100% width, 'top' and 'bottom' are x pixels high
>>> and middle hight is to fill the rest of the page. Standard scrolling
>>> is disabled and 'middle' is set to (css) 'overflow:auto'.
>>> Problems:

>
> I know for a fact that it is possible with the use of tables, an
> example:
> http://www.zacariazdisciples.net/g33kz%2Dinn/ (doesnt work as i have
> specified doctype, but it should be clear from the code)


The bottom seems to be completely outside the window, the left is continuing
out from window... Maybe you get some help of this article
http://www.themaninblue.com/writing/...08/29/#content



--

//Aho
 
Reply With Quote
 
Rob Waaijenberg
Guest
Posts: n/a
 
      09-23-2007
schreef:
> edit:
>>>> It is possible. You are trying to do the wrong thing.
>>> Yes, but it seems to me that if it is possible in tables it should
>>> allso be possible by the use of divs, but maybe im mistaken.

>
> I read that wrong.
> What you are saying here is contradiction it self.
> 1. you say it is possible.
> 2. you say im trying to do the wrong thing, e.g. its not possible? or
> do you mean that i am using the wrong methode? In than case i would
> like to know how.
>


Other possibily: you are trying to achieve the wrong effect.
(that would not contradite it being possible)

--
Rob
 
Reply With Quote
 
zacariaz@gmail.com
Guest
Posts: n/a
 
      09-23-2007
ok, so youre saying that:

<body style="height:100%">
<div style="heightpx">top</div>
<div style="height:100%">middle</div>
<div style="heightpx">bottom</div>
</body>

is just not possible?

 
Reply With Quote
 
julian.bash
Guest
Posts: n/a
 
      09-23-2007
On Sep 23, 10:13 pm, zacar...@gmail.com wrote:
> ok, so youre saying that:
>
> <body style="height:100%">
> <div style="heightpx">top</div>
> <div style="height:100%">middle</div>
> <div style="heightpx">bottom</div>
> </body>
>
> is just not possible?


You should use absolute positioning, like this:

div { position:absolute; width:100%; }
#top { height:100px; }
#middle { height:100%; margin-top:100px; margin-bottom:100px; }
#bottom { height:100px; bottom:0; }
// Make it work in ie (bottom:0 doesn't work, javascript needed)
#bottom { margin-top: expression(document.body.clientHeight-100); }

Read more about absolute positioning here: <http://www.alistapart.com/
articles/conflictingabsolutepositions>

--Julian

 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      09-23-2007
In article
<. com>,
wrote:

> ok, so youre saying that:
>
> <body style="height:100%">
> <div style="heightpx">top</div>
> <div style="height:100%">middle</div>
> <div style="heightpx">bottom</div>
> </body>
>
> is just not possible?


if x>0, how can this be possible? Forget about anything else,
just look at your code here.

--
dorayme
 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      09-23-2007
julian.bash wrote:
>
> #middle { height:100%; margin-top:100px; margin-bottom:100px; }


Wouldn't that would make the total height 100% plus 200px?

--
Berg
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data structuring help needed. arun.hallan@gmail.com ASP .Net 3 03-14-2006 11:25 AM
Structuring of large application Damien ASP .Net 1 01-05-2005 11:43 AM
Structuring JUnit tests for large package structures? Stephen Riehm Java 2 11-03-2004 11:32 PM
Structuring Site/Solution Simon Harris ASP .Net 1 10-05-2004 05:33 PM
XML, XHTML, Text Structuring, and CSS Blue HTML 26 01-03-2004 11:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57