469,343 Members | 5,380 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

Nested DIV is locking layout via CSS

Isn't it so that when you are creating DIVs you are
defining a part of the used layout? I will give an example.

I set up two DIV's: ID 'main_story' and ID 'summary'.
After setting this up I think it looks nice to have the summary put
into the upper-left corner of the main-story. And so I nest DIV
'summary' into DIV 'main_story'. Easy does it.

After a month or 3 I see a nice website and they have the 'summary' in
the top-left corner of the browser window, and not nested in the
main-story.

But we locked all summaries nested into the main-story, in 300
html-files. That's a problem right?

So the solution is to define every DIV absolute and not nested, just in
one line, no levels.

Any thoughts on that?

Jul 24 '05 #1
2 3283
Henk wrote:
So the solution is to define every DIV absolute and not nested, just in
one line, no levels. Any thoughts on that?


Then you would be unable to place one section below another unless you know
its height in advance. Given variants in font size, that's impossible
unless you play around with overflow and have a page littered with
scrollbars.

Far simpler to just use a templating system. I'm fond of Template::Toolkit.
http://www.template-toolkit.org/

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #2
in comp.infosystems.www.authoring.html, Henk wrote:
Isn't it so that when you are creating DIVs you are
defining a part of the used layout?
Not very often.
I set up two DIV's: ID 'main_story' and ID 'summary'.
After setting this up I think it looks nice to have the summary put
into the upper-left corner of the main-story. And so I nest DIV
'summary' into DIV 'main_story'. Easy does it.

After a month or 3 I see a nice website and they have the 'summary' in
the top-left corner of the browser window, and not nested in the
main-story.

But we locked all summaries nested into the main-story, in 300
html-files. That's a problem right?
At least in this case, it isn't. Of course, there is likely to be
something that you didn't tell us. URL.

Of course, if you deside that summary is not logical part of the original
div, you might want to change markup. Of course, there is practical
reasons for not do this, and no practical reasons to do it.
So the solution is to define every DIV absolute and not nested, just in
one line, no levels.
Why? What problem you think it solves? Absolute position is quite
limiting...
Any thoughts on that?


And exactly what problem did you have? The markup does not need any
change here... use whichever makes more sence.

If you are afraid of problems in 300 files, use preprosessing, or
make it easy to do afterprosessing...

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Jane Withnolastname | last post: by
9 posts views Thread by Dustin | last post: by
5 posts views Thread by Markus Ernst | last post: by
1 post views Thread by DotNetGuru | last post: by
5 posts views Thread by ~~~ .NET Ed ~~~ | last post: by
3 posts views Thread by Roy | last post: by
4 posts views Thread by D | last post: by
2 posts views Thread by gezerpunta | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.