Limiting content width - DIV or BODY?

M

Michael Laplante

Jonathan N. Little said:
Michael Laplante wrote:
Page margins for printing are the user and browser not the website
designer and therein lies your problem.

I have come across articles by people who've successfully attempted the
problem with CSS. Summarizing their technique, they produce margins that
were larger than the typical margins found in printer setups. The user can
make the margins smaller but not bigger.

I won't quibble the merits of whether this is a service or disservice to the
end user. I just want to do the same thing.

In all these articles though, they are printing out small pages that
normally didn't straddle more than a page. A few of them referred to the
multipage DIV issue with Gecko browsers and could offer no solutions beyond
variations of the ones I've already suggested myself.

I guess I'm stuck with PDF or perhaps selectively removing CSS formatting
and providing some sort of instructions for users on how to adjust the page
margins in their software.

M
 
K

kchayka

Michael said:
I've checked out some award-winning websites
http://www.aawebmasters.com/
http://www.webaward.org/
ROTFLMAO

Can you give me a URL for a site that uses
only relative positioning so I can study it?

You don't get it (yet). Why do you think you even need relative
positioning in the first place?
Better yet if I can see the stylesheet behind it.

That won't help you unless you understand what relative positioning
actually does. I bet you think it's a variation of absolute
positioning. It isn't.
I've never come a across a site of any sophistication that can't be "messed
up" by increasing font size, particulary in Gecko browsers so I don't think
this observation is valid.

That statement is invalid, AFAIC. A properly designed site will adapt
to the visitor's browsing environment. If it doesn't, it's poor *web*
design. Hint: a web page is not a piece of paper.

As for gecko, I would have a very hard time with the majority of web
sites if I couldn't easily override stoopid deezyner microfonts. Some
of us are not so lucky in the vision department.
HTML novice,

M

I find it puzzling how you, an admitted novice, can so easily dismiss
the advice of those with more experience. Is it because your code was
insulted?
 
K

kchayka

Jose said:
And as far as I can read and see, CSS is not ready for prime time.

Sure it is, you just have to know how to use it properly. Accept what
it can and cannot do and give up the notion that the author has any
real control over what the visitor sees.
Although the intent of separating structure and presentation is
laudable, CSS seems to break too easily.

That usually happens when people do silly things like absolutely
position everything on a page, thinking it will "force" the visitor to
see things the deezyner's way. Such attempts are almost always doomed
to failure.

CSS can be misused in other ways, too, such as by newbies who haven't
yet learned the box model or how different positioning methods really
work. Ignorance often leads to setting conflicting properties in an
attempt to make something "work", and broken layouts.

CSS takes time to learn, and lots of practice. Don't give up on it
without giving it a fair shake, eh? Get some well-tested templates to
study, for a start, such as at:
<URL:http://css-discuss.incutio.com/?page=CssLayouts>

There are also a huge number of examples that are posted in usenet, in
this group and at comp.infosystems.www.authoring.stylesheets. You'll
learn loads just by lurking in these groups. And read the specs or a
book that further helps explain what's going on. You'll get it if you
work at it, but it *does* take work.
 
K

kchayka

Michael said:
And if one of
them could solve my print issue, I would bow down in the bright glow of
their brilliance. . .

I don't believe your particular issue can be resolved with simple CSS.
You have underlying problems with the HTML that prevent such a simple
solution. You don't seem to be willing to address that.
 
M

Michael Laplante

kchayka said:
Michael Laplante wrote:
I find it puzzling how you, an admitted novice, can so easily dismiss
the advice of those with more experience.

Easy there, little guy. I know you think you're an alpha male in the ng and
all, but so far all you've done over three replies is break a lot of wind.

So far I haven't seen a snippet of code from you, not one suggestion beyond
"relative positioning" with no particular argument to support it, no
suggestions for my print issue, not one URL to your website or any others
that might show me what a CSS wizard you are.

Appreciate your help, but you can move on to someone else now. . .

M
 
M

Michael Laplante

kchayka said:
Michael Laplante wrote:

Is that dazzling site yours? If it is, please, please don't help me anymore.

Learning something new every day,


M
 
T

Toby Inkster

Michael said:
So far I haven't seen a snippet of code from you, not one suggestion beyond
"relative positioning" with no particular argument to support it

kchayka didn't recommend relative positioning. I don't think anyone has.

Everyone's just said that one should avoid absolute positioning (unless
one knows what one is doing). Relative positioning is not the only other
alternative; indeed relative positioning is generally even *less* useful
than absolute positioning.
 
M

Michael Laplante

kchayka said:
Michael Laplante wrote:
I don't believe your particular issue can be resolved with simple CSS.

Duh. I think me and several other people have already concluded that. Catch
up will you?
You have underlying problems with the HTML that prevent such a simple
solution.

Here's whatcha do:

Strip out my code, even toss the graphics if that helps. Just keep the text
and table.
Throw up a printing solution that solves my problem.
Post it or send me the code to study.

Shouldn't take 10 minutes for a person of your immense talents.

Waiting with bated breath,

M
 
T

Toby Inkster

Michael said:
Strip out my code, even toss the graphics if that helps. Just keep the text
and table.
Throw up a printing solution that solves my problem.

I did a few hours ago, but you don't seem to have replied to my post.
Here's the URL again in case you missed it:
http://examples.tobyinkster.co.uk/bcfirstaid.com/adult.html
Shouldn't take 10 minutes for a person of your immense talents.

It didn't even take that long.

And I've made a couple more improvements to your code now. (Removed the
blue background from the print version -- it would just waste everyone's
expensive colour ink. Kept it on the screen version of course.)
 
M

Michael Laplante

Toby Inkster said:
http://examples.tobyinkster.co.uk/bcfirstaid.com/adult.html

I've taken out your menu script which is rubbish and needs a complete
rewrite anyway.

Fair enough. It's from a script farm. I see you left the container though.
How would the nav menu script have affected the printing?

In my IE the table still stretches beyond the right-hand edge and the course
price is out of sight, i.e. no right-hand margin. I can post a screen cap,
if you like.

However, you do appear to have overcome the Firefox DIV issue. Can I study
the style sheets you used?

Thanks for your time and effort. A refreshing change from some people here.

M
 
T

Toby Inkster

Michael said:
In my IE the table still stretches beyond the right-hand edge and the course
price is out of sight, i.e. no right-hand margin. I can post a screen cap,
if you like.

I've not checked in IE as I don't have it installed here, but I would
guess that the problem lies with some of the inline styles you've used
(style="..." all over the place!).

Try moving them out into your screen (not print) style sheet instead of
keeping them inline.
However, you do appear to have overcome the Firefox DIV issue. Can I study
the style sheets you used?

Feel free -- it's exactly the same style sheet I posted to this newsgroup
earlier though:

http://examples.tobyinkster.co.uk/bcfirstaid.com/print.css
 
M

Michael Laplante

Toby Inkster said:
Michael Laplante wrote:
It didn't even take that long.

And it's been infinitely more educational and enlightening than one thing
that kchayla has said or done over half a dozen posts or more.
Man, is THAT guy unproductive. . .

Thanks for the effort.

M
 
N

Neredbojias

To further the education of mankind, Neredbojias
To further the education of mankind, "Jonathan N. Little"


Gee, that seems awfully

Oops, missing word. ..."Forgetful".
 
D

dorayme

Michael Laplante said:
dorayme said:
Because. . .?

Well, I have just quickly read the 38 posts following this in the
thread and there are some answers that go into a bit of detail
about this. But you can surely see that my "if you can do without
it" and "tricky" in relation absolute positioning just has to add
up to the advice that Mark Parnell gave you in the first place.

Let me put it another way. Absolute positioning would be the last
thing that you learn to use well in a css course, it is a
counter-intuitive tool and gives surprising results. You will
come to see that sometimes the best course is to avoid it
altogether to begin with and proceed with great caution after
that.

Just a note about "relative positioning" that you often contrast
with "absolute positioning" as if it is the natural contrast in
every context. It is not the natural contrast. (kchayka, I think,
hinted at this without - understandably - going into it.) The
biggest contrast is no overall positioning at all (this is not
"relative positioning"). Pages can rely on the order of the HTML,
the instructions about margins and other css, even floats (these
are taken out of the flow in controlled ways but are not part of
what is known as "relative" positioning in css.) Relative
positioning is a technically specific thing to do with offsets.
You're the first one who has ever mentioned this. Nor can I can replicate
this behaviour in any of my three browsers. What browser / version are you
using? Do you use a personalized stylesheet?

No personalised sheet, no. I was using a variety of browsers on a
Mac. If you cannot replicate it at all, I suspect you are not
getting my meaning. See below.
"It looks to have no place!" Can you expand on that?

When the window and/or text-size is varied, this menu floats
about in unexpected ways, sometimes obscuring things that may be
important underneath. Even when the window is large and the text
small enough, there is a sense that it it is jammed up against an
edge, as it if needs some margin of grace outside itself. This
bit is an aesthetic matter which needs sensing. You have the
sense of needing grace with margins for printing, now you need to
imagine grace of a slightly more complex kind. Best I can do old
chum? All this is, of course, has nothing to do with the
advisability of having such a scripted object. It could happen to
any absolutely positioned object!
What do you mean by "breaks badly?' Lots of pages -- even ones that
validate -- break badly when text is enlarged.

I mean that the text in the menu half or wholly disappears too
easily. You seem to take some comfort or refuge in the principle
that perfection is rare to see. The point is that it is too far
from perfect when just 2 or 3 clicks of text enlarging and window
variations causes trouble. Jonathan Little (to whom, btw, you
were unnecessarily rude. Yes, he's another mate of mine, so piss
off!) made this point (naturally, not with my sense of eloquence
- but he is just a simple artist and keen and knowledgeable
student of html and css)

We must be careful of this mistake in thinking. Not too many folk
would disagree with you about even good sites breaking (which
means roughly doing surprising things that shock idealists) under
extreme conditions. Basically you need to cater for a reasonable
variety of viewing or using conditions.
 
K

kchayka

Michael said:
Easy there, little guy. I know you think you're an alpha male in the ng

You couldn't be more wrong. ;)
So far I haven't seen a snippet of code from you,

I don't spoon-feed newbies, especially those with an attitude. Tis
better to teach people how to help themselves, but that only works if
they are really interested in learning. Sadly, that doesn't seem to be
the case here.
not one suggestion beyond
"relative positioning" with no particular argument to support it,

No, I never suggested positioning of any kind. I distinctly recall
questioning your need for it at all, and more than once. You simply
don't understand the technology you're attempting to use, and don't
seem terribly interested in learning how to use it wisely. There is
nothing worse than a closed mind. :(
no suggestions for my print issue,

The issue is far bigger than print. My suggestion was to get some
good, pre-made templates, study how they were made, and start over. I
even posted a link or two.

If you want to remain ignorant, that is your choice, but the regulars
won't take kindly to it.
not one URL to your website or any others
that might show me what a CSS wizard you are.

I'll cut you a little slack because you're new around here. I've been
around for a long time. I don't need to prove myself to you.
Appreciate your help,

Don't lie now. It's rude. ;)
but you can move on to someone else now. . .

But we were having so much fun... :(
 
A

Andy Dingley

Michael said:
I have come across articles by people who've successfully attempted the
problem with CSS.

No they haven't. CSS simply doesn't have access to the physical page
rather than the canvas in the manner you'd need to do this.

(Best technique so far available is MeadCo's ScriptX ActiveX control -
with obvious limitations)
 
M

Michael Laplante

kchayka said:
Michael Laplante wrote:

FWIW:

1. Don't help or even respond to a post if you don't have a genuine intent
to help.

2. Don't patronize and tell someone they don't understand their problem. If
you don't have enough information, ask for details. I'm an engineer
myself -- I don't presume to know anything about the problem until I have
all the information. Sometimes people don't realize they might still have
useful information. I'm the expert not them. I ask questions first, draw the
information out, experiment and play around with that information, draw
conclusions and make recommendations. (Standard engineering / scientific
methodology. . .)

3. If you don't have an answer due to lack of time, whatever, don't fake it
with the first thing that pops out of your head. People can tell when you're
guessing, then your entire professionalism comes into doubt.

4. If you're going to show off your web prowess -- especially after laughing
at sites that appear to be recognized by the industry itself -- it better be
something breathtaking. Not something so mindnumbingly banal in it's concept
and execution that it could have just as easily been done with tables.
(Tables would have been better anyway because your site didn't validate and
breaks in FF.)

I'm sure you've memorized every HTML / CSS tag and attribute there is and
can whip up code faster than an omelet. However, there's a big difference
between a mechanic and an automotive engineer. I'm not either but I know
enough about cars to be able to tell the difference. (Metaphor. . .)

You want to improve yourself as a teacher and guide, review the thread and
take some lessons from others. . .

M
 
N

Neredbojias

To further the education of mankind, "Michael Laplante"
I'm an
engineer myself -- I don't presume to know anything about the problem
until I have all the information.

You'd make a lousy scientist.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top