HighDots Forums  

NOT resize an element?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss NOT resize an element? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lcplben
 
Posts: n/a

Default NOT resize an element? - 11-02-2009 , 05:56 AM






I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever. That is, I want the
banner's height to survive resizing unchanged (so that the resized
banner doesn't squeeze out real info).

Any way to ask the browser to NOT resize that banner?

Thanks to all.

-- ben

Reply With Quote
  #2  
Old   
Andy Dingley
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 06:07 AM






On 2 Nov, 10:56, lcplben <b... (AT) sellmycalls (DOT) com> wrote:
Quote:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever.
You just can't. You can set the banner size in pixels, and you have
a reasonable hope of it staying at that many pixels. However your web
page, and even the user's browser, has no real idea of how physically
large the slab of glass in front of the user is, so "physical world"
units like this are fragile at best.

Secondly, why would you want the banner to stay 1cm high? That might
be "about right" on your desktop, but it's far too big on a phone and
it's tiny on a wall-mounted plasma screen display. Just this week I'm
working on a "status dashboard" that's viewed from two devices: a
Nokia 810 and a 30-something inch plasma screen that's viewed from
across the room. Interesting they both appear at about the same size
(solid angle subtended at the eye) to their users, which is pretty
small compared to a desktop.

In most cases, dimensions should be chosen as follows:

* "Text based" stuff should use "em"s, which will track the user's
favoured settings for a reasonable text size. This should be your
starting default for everything.

* "Images", and image containers, might use pixel sizes around an
image that's of known fixed size.

* Print work (i.e. on paper, not screen) starts to care about physical
dimensions like cm and points. However you're now likely to find that
your work becomes very dependent on particular users and their
settings. OK for an intranet, not so easy on teh intawebs.


I suspect that your size problem is related to image detail within an
image and that using pixel dimensions will work best for you.

If you use some fairly simple CSS, then you can indicate that the
image ought to be 1cm high. Just don't expect this to match a ruler
placed on the screen, unless you do some configuration, and even then
it will be different for other people.

Reply With Quote
  #3  
Old   
Swifty
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 08:44 AM



Andy Dingley wrote:
Quote:
On 2 Nov, 10:56, lcplben <b... (AT) sellmycalls (DOT) com> wrote:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever.

You just can't. You can set the banner size in pixels, and you have
a reasonable hope of it staying at that many pixels. However your web
page, and even the user's browser, has no real idea of how physically
large the slab of glass in front of the user is, so "physical world"
units like this are fragile at best.
Imagine that 1cm header displayed by a browser on one of those displays
around the edges of the Olympic stadium in China.

Also, I can browse the web with my mobile phone, whose display is 2.7cm
high.

I'll admit that designing webpages with these two extremes in mind might
be a little challenging, but you get the idea.

Actually, all of my webpages display extremely poorly on mobile phones,
but none of my users has asked for this yet. This is lucky, as they
displayed poorly even when I tried something with cellphones in mind.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Reply With Quote
  #4  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 09:25 AM



lcplben <ben (AT) sellmycalls (DOT) com> writes:

Quote:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever.
Want something else. That's now how the web works. For that matter,
its size in pixels might not work out to 1cm even *without* it being
resized. Browsers don't know the DPI resolution of a user's monitor,
so images are displayed pixel for pixel, not at a specific size in cm
or inches.

sherm--

Reply With Quote
  #5  
Old   
lcplben
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 11:03 AM



On Nov 2, 9:25*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
Quote:
lcplben <b... (AT) sellmycalls (DOT) com> writes:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever.

Want something else.
Honest, guys! My heart is pure! I would like to keep this banner from
becoming obtrusive, to prevent it from taking over a whole lot of the
viewport. To put it another way, I want to show the user as much
useful info as I can, abandoning this banner if I have to. I should
have asked the question in that way instead of picking that 1cm height
example.

So: in the face of the user's resizing the page, is there any way I
can put the ever-encroaching banner out of the way?

Thanks again!

-- ben

Reply With Quote
  #6  
Old   
David E. Ross
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 11:03 AM



On 11/2/2009 2:56 AM, lcplben wrote:
Quote:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever. That is, I want the
banner's height to survive resizing unchanged (so that the resized
banner doesn't squeeze out real info).

Any way to ask the browser to NOT resize that banner?

Thanks to all.
A basic convention of Web design for making pages that are viewable by
as large an audience as possible is that pages should adapt to differing
monitor sizes, screen resolutions, and browser window sizes. A
fixed-height area on a page violates that convention. (See, for
example, <http://www.anybrowser.org/campaign/abdesign2.html#screensize>.)

For photographs and other graphics, I do use fixed heights and widths.
However, I also verify that -- at 800x600 resolution -- they fit into
less than the width of a 17" monitor. Horizontal scrolling of my pages
should not be necessary even when a non-browser toolbar occupies part of
the screen width. Generally, vertical scrolling is also not necessary
to view an entire photo or graphic, even if the rest of the page does
require vertical scrolling to read all the content. For really large
photos that I don't want to shrink, I provide thumbnails that are links
to pages that contain only such photos.

Scrolling up and down and back and forth to view someone else's photo or
graphic is annoying to me. I try to avoid imposing that annoyance onto
my own audience.

--

David E. Ross
<http://www.rossde.com/>.

Don't ask "Why is there road rage?" Instead, ask
"Why NOT Road Rage?" or "Why Is There No Such
Thing as Fast Enough?"
<http://www.rossde.com/roadrage.html>

Reply With Quote
  #7  
Old   
lcplben
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 11:10 AM



On Nov 2, 11:03*am, "David E. Ross" <nob... (AT) nowhere (DOT) invalid> wrote:
Quote:
On 11/2/2009 2:56 AM, lcplben wrote:

I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever. That is, I want the
banner's height to survive resizing unchanged (so that the resized
banner doesn't squeeze out real info).

Any way to ask the browser to NOT resize that banner?

Thanks to all.


Scrolling up and down and back and forth to view [presented info] is annoying to me.
Exactly so.

Honest, guys! My heart is pure! I would like to keep this banner from
becoming obtrusive, to prevent it from taking over a whole lot of the
viewport and pushing info out of the viewport . To put it another way,
I want to show the user as much useful info as I can, abandoning this
banner if I have to. I should have asked the question in that way
instead of picking that 1cm height example.

So: in the face of the user's resizing the page, is there any way I
can put the ever-encroaching banner out of the way?

Thanks again!

-- ben

Reply With Quote
  #8  
Old   
David E. Ross
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 12:26 PM



On 11/2/2009 8:10 AM, lcplben wrote:
Quote:
On Nov 2, 11:03 am, "David E. Ross" <nob... (AT) nowhere (DOT) invalid> wrote:
On 11/2/2009 2:56 AM, lcplben wrote:

I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever. That is, I want the
banner's height to survive resizing unchanged (so that the resized
banner doesn't squeeze out real info).
Any way to ask the browser to NOT resize that banner?
Thanks to all.

Scrolling up and down and back and forth to view [presented info] is annoying to me.

Exactly so.

Honest, guys! My heart is pure! I would like to keep this banner from
becoming obtrusive, to prevent it from taking over a whole lot of the
viewport and pushing info out of the viewport . To put it another way,
I want to show the user as much useful info as I can, abandoning this
banner if I have to. I should have asked the question in that way
instead of picking that 1cm height example.

So: in the face of the user's resizing the page, is there any way I
can put the ever-encroaching banner out of the way?

Thanks again!

-- ben
Use CSS and create a style for the banner where height and width are
expressed as percentages of the parent block. If you do it right, the
parent block will be the BODY element of the page. Then, as the page
changes size, the banner should change with it.

--

David E. Ross
<http://www.rossde.com/>.

Don't ask "Why is there road rage?" Instead, ask
"Why NOT Road Rage?" or "Why Is There No Such
Thing as Fast Enough?"
<http://www.rossde.com/roadrage.html>

Reply With Quote
  #9  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 12:33 PM



lcplben <ben (AT) sellmycalls (DOT) com> writes:

Quote:
On Nov 2, 9:25*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
lcplben <b... (AT) sellmycalls (DOT) com> writes:
I have a banner at the top of the page that is 1cm in height. I want
that banner to retain its 1cm height forever.

Want something else.

Honest, guys! My heart is pure!
Browsers don't care - they work in exactly the same way whether you're
Gandhi or Jack the Ripper. You want something they don't do, which leaves
you with two choices: Want something else, or be disappointed when reality
fails to live up to your desires.

sherm--

Reply With Quote
  #10  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: NOT resize an element? - 11-02-2009 , 12:41 PM



lcplben <ben (AT) sellmycalls (DOT) com> writes:

Quote:
So: in the face of the user's resizing the page, is there any way I
can put the ever-encroaching banner out of the way?
The banner would only be encroaching to begin with if you're going out
of your way to make it do so, by using a fixed-width layout or absolute
positioning.

So - don't do that. :-)

sherm--

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.