Page breaks when content is too wide

For my developed themes, specially reDesign. Please make different topic for every problem.
Vasta teemaleVasta teemale Printerisõbralik lehekülg
Foorumi KKKOtsiVaata vastamata teateid

Page breaks when content is too wide

Postitus Postitatud: 21.06.10. 17:05:36

I've just started building a new DF site using redesign3 :-

www.urban-zone.org/dragonfly/

(temporary URL, it'll change soon)

And although it looks great (excuse the header, we're getting a better one done), the page breaks if the content in the central pane is too wide. In fact it renders the side blocks and puts the content underneath them, which could be way way down the page if the side blocks are tall.

Can something be done about this? I tried editing the stylesheet myself but I'm not great with CSS and couldn't get the centre content div to stay put. What I really want is a horizontal scroll bar to appear if the content is too wide. I know that looks a bit bad as well but it's better than a big empty space in the middle of the page and the main content somewhere disappearing off the bottom.

Kendle please enter your server specs in your user profile! Nuttev või väga kurb

Kendle
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 21.06.10. 21:46:59

You really should try to get content not to be wide. e.g thumbnails for images, etc.

However, if both blocksides are always visible you could simply add padding of the width for the both side of the content and negative margin for the sideblocks - it should work. I tried to do it dynamically at first, but then found another way (with the "bug" you just described, included).

I'm a bit busy atm, so I might not respond too quickly, but you're welcome to ask any further questions.

Madis's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.5/9.2.1

Madis
Administraator
Administraator
 

Re: Page breaks when content is too wide

Postitus Postitatud: 2.07.10. 16:00:15

I've fixed my content problem. Here's what I did :-

In style.css I added / amended these classes

Kood:
#maincontainer {
  float: left;
  width: 100%;
  padding-top: 10px;
}
/* The content area between sideblocks */
#main { /* no blocks */
  margin: 0 0 0 0;
  padding-left: 10px;
  padding-right: 10px;
}
#main-l { /* left blocks only */
  margin: 0 0 0 200px;
  padding-left: 10px;
  padding-right: 10px;
}
#main-r { /* right blocks only */
  margin: 0 200px 0 0;
  padding-left: 10px;
  padding-right: 10px;
}
#main-lr { /* left and right blocks */
  margin: 0 200px 0 200px;
  padding-left: 10px;
  padding-right: 10px;
}
/* Left side blocks */
#pe600 {
  float: left;
  width: 200px;
  margin-left: -100%;
  padding-top: 10px;
}
/* Right side blocks */
#pe601 {
  float: left;
  width: 200px;
  margin-left: -200px;
  padding-top: 10px;
}

In header.html I dynamically added the correct centre content class

Kood:
  <div id="maincontainer">

    <!-- Start the main content area between left and right blocks -->

    <!-- IF S_LEFTBLOCKS and S_RIGHTBLOCKS -->
    <div id="main-lr">
    <!-- ELSE -->
    <!-- IF S_LEFTBLOCKS -->
    <div id="main-l">
    <!-- ELSE -->
    <!-- IF S_RIGHTBLOCKS -->
    <div id="main-r">
    <!-- ELSE -->
    <div id="main">
    <!-- ENDIF -->
    <!-- ENDIF -->
    <!-- ENDIF -->


I moved the left and right blocks to footer.html, below #maincontainer (and removed a [ br style="clear:both;" ] from immediately above the bottom centre blocks)

And in theme.php I moved the call to $Blocks->display() to themefooter()

Kendle please enter your server specs in your user profile! Nuttev või väga kurb

Kendle
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 3.07.10. 00:37:50

Hi Kendle,

I too had the same problem I fixed it some what by changing the min width in mainstyle.css but in ie6 it still a dog.

I noticed on your link in ie6 the right blocks are gone and the left block merges over the center content.

I am not sure how everyone feels about ie6 and having sites performing in it but I for one will be happy when it's a distant bad memory.

Cheers
  • urban.jpg
  • Kirjeldus: screenshot
  • Faili suurus: 58.37 KB
  • Vaadatud: 32 kor(r/d)a
  • urban.jpg


Rusty_'s server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 2.2.6 / 5.0.45 / 5.2.4 / 9.2.1

Rusty_
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 3.07.10. 13:01:56

Fortunately no-one has complained about that yet, so I guess none of our users use IE6 Silmapilgutus

Of course there is an even more fool-proof way of ensuring content is displayed properly in all browsers ....

[ table ]
[ tr ]
[ td ] left blocks [ / td ]
[ td ] centre content [ / td ]
[ td ] right blocks [ / td ]
[ / tr ]
[ /table ]

but the 'net Gods have spoken and we must not use tables to display tabular data anymore lest we be revealed for the in-bred redneck backward thinking neanderthals we are Silmapilgutus

Kendle please enter your server specs in your user profile! Nuttev või väga kurb

Kendle
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 3.07.10. 17:32:58

You had the right approach, Kendle. Good job - if it works well, I'll use it the same way in future.

Madis's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.5/9.2.1

Madis
Administraator
Administraator
 

Re: Page breaks when content is too wide

Postitus Postitatud: 3.07.10. 20:32:21

Great Kendle! I have always loved reDesign3, but I haven't used it because of the page break.
Is it possible to post the updated files here? Then it would be easy to use this update for the dummies (as me) Naeratus

Dylert please enter your server specs in your user profile! Nuttev või väga kurb

Dylert
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 4.07.10. 15:54:11

Attached are the files I changed.

One thing to note, this works because it displays the centre content with margins wide enough to accommodate the left and right blocks, but if there's something in the centre content area that's too big it'll still spill over the sides, the only difference is the right blocks will appear on top of the too wide content, rather than be pushed off the side and down the page. In other words it'll still look bad if the content is too wide, but at least the right blocks don't disappear way down off the bottom of the page.

I suppose you can do something about that with overflows, but I think that would only work with fixed width themes.


Kendle please enter your server specs in your user profile! Nuttev või väga kurb

Kendle
Algaja
Algaja
 

Re: Page breaks when content is too wide

Postitus Postitatud: 5.07.10. 18:18:04

Thanks a lot, Kendle! I don't use right blocks on my site, so I think this will suite perfect! Naeratus

Dylert please enter your server specs in your user profile! Nuttev või väga kurb

Dylert
Algaja
Algaja
 
Lehekülg 1, lehekülgi kokku 1



Sa ei saa teha siia alafoorumisse uusi teemasid
Sa ei saa vastata siinsetele teemadele
Sa ei saa muuta oma postitusi
Sa ei saa kustutada oma postitusi
Sa ei saa hääletada küsitlustes
Sa ei saa lisada faile selles alafoorumis
Sa saad allalaadida faile selles alafoorumis