By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,805 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,805 IT Pros & Developers. It's quick & easy.

Make the CSS Right property work with absolute elements in IE

P: n/a
Hi,
I want to be able to define the right property of my absolute positionned
elements... for example if a button is 50px left and 150px right, it will
resize when the page is resized.
This is working fine in Mozilla but it isn't working in Internet Explorer
:( Is this a known bug ? do you have any suggestion without using tables or
OnResize event ?

Best regards,

John.
Jul 20 '05 #1
Share this Question
Share on Google+
28 Replies


P: n/a
Els
jonjon wrote:
Hi,
I want to be able to define the right property of my absolute positionned
elements... for example if a button is 50px left and 150px right, it will
resize when the page is resized.
This is working fine in Mozilla but it isn't working in Internet Explorer
:( Is this a known bug ? do you have any suggestion without using tables or
OnResize event ?


Maybe without absolute positioning (with a url it would be
easier to guess what might work):

margin-left:50px;
margin-right:150px;
width:auto;

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

P: n/a
> Maybe without absolute positioning (with a url it would be
easier to guess what might work):

margin-left:50px;
margin-right:150px;
width:auto;


Thank you for your fast answer, unfortunatly I really need absolute
positionning.
Here is a link to test the behavior in Internet Explorer and Mozilla... the
red DIV should resize with the page:
http://modularity.free.fr/test/testright.htm
Thank you,

John.
Jul 20 '05 #3

P: n/a
On Mon, 5 Apr 2004, jonjon wrote:
unfortunatly I really need absolute positionning.

^^^^^^^^^^^

Then, as a WWW page, your design is doomed.

Hint: the presentation, no matter how desirable, is optional: that
comes with the territory.
Jul 20 '05 #4

P: n/a
> > unfortunatly I really need absolute positionning.
^^^^^^^^^^^

Then, as a WWW page, your design is doomed.

Hint: the presentation, no matter how desirable, is optional: that
comes with the territory.


Well I can understand your point of view, however I'm developping a software
to ease the process of creating web pages (
http://www.dynamicarchitect.com ) and the whole concept is about absolute
positionning. That's why I'd be glad if somebody had a solution of a good
alternative to the right property for Internet Explorer.
Thank you for your help.

Best regards,

John.
Jul 20 '05 #5

P: n/a
"jonjon" <no**@for.now> wrote:
Well I can understand your point of view, however I'm developping a software
to ease the process of creating web pages (
http://www.dynamicarchitect.com ) and the whole concept is about absolute
positionning.


The clueless teaching the even more clueless, sheesh.

--
Spartanicus
Jul 20 '05 #6

P: n/a
Els
jonjon wrote:
Maybe without absolute positioning (with a url it would be
easier to guess what might work):

margin-left:50px;
margin-right:150px;
width:auto;
Thank you for your fast answer, unfortunatly I really need absolute
positionning.


Unfortunately indeed. :-)
Here is a link to test the behavior in Internet Explorer and Mozilla... the
red DIV should resize with the page:
http://modularity.free.fr/test/testright.htm


It does in NS7.1.
Doesn't show in IE, cause you didn't set a specific height
on the div and the body.
But I changed some things, and it almost looks like your
example, but without absolute positioning.
http://locusmeus.com/test/testright.html
The left and right side aren't a problem, the bottom is.
The div needs a height, and the vertical margins seem to be
added to that height.
Different approach, same problem with total height of page:
http://locusmeus.com/test/testrightdifferent.html

Could you explain why it has to absolute positioned?
(not that it helps, I'm just curious)
--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #7

P: n/a
On Mon, 5 Apr 2004, jonjon wrote:
http://www.dynamicarchitect.com


I'm sure it's very pretty when the presentation situation meets your
expectations, but here's an extract which indicates what the WAI gets
to hear (or an indexing robot gets to index, for that matter):

Products | Software | Developer Section

[separ8x8.gif]

[datitle-green.gif] [separ8x8.gif]

[da-pres5.gif]

[separ8x8.gif]

[dashot1-small.gif]
Click to enlarge

Key features...
[puce1.gif] Generate Dynamic HTML
[puce1.gif] Cross Browser compatible
[puce1.gif] WYSIWYG Editor
[puce1.gif] Pixel perfect web pages
A comment on those "key features":

WWW pages don't really work like that, no matter how hard you might
wish it. "What you see" is not what others get (it's just one
possible rendering), and IBM HPR, or JAWS, to take just two examples,
will make a nonsense of your "pixel perfection". Your concept of
"Cross Browser compatible" is somewhat limited - I'm not even sure
that the proffered page (which in fact seems to be
http://www.ibe-software.com/products...amicarchitect/ ) is
even cross compatible with -one- browser, across the browser's full
range of likely user preference settings.

Since this is the stylesheets group, I would have to recommend, as a
first priority, that you cut right back on embedding images of text,
and use a stylesheet instead. Or if you're -so- determined to get DTP
instead of a WWW page, then use PDF format instead of mis-applying WWW
techniques. At least if you do PDF properly, then text can be
extracted from it.

good luck.
Jul 20 '05 #8

P: n/a
Quoth the raven named jonjon:
Well I can understand your point of view, however I'm developping a
software to ease the process of creating web pages (
http://www.dynamicarchitect.com ) ...


That page (and in fact the whole site) is really cute with the nice
hot pink background!

(Oh wait, pink is /my/ default background color. You haven't specified
any. Hint: wherever you specify a color, you include a background color.)

It redirects to:
http://www.ibe-software.com/products...amicarchitect/

--
-bts
-This space intentionally left blank.
Jul 20 '05 #9

P: n/a
> The clueless teaching the even more clueless, sheesh.

First our goal is not to "teach" as you say, then where is the hint for the
problem I first exposed from the knowloadgeable person you seem to be ?
Jul 20 '05 #10

P: n/a
> I'm sure it's very pretty when the presentation situation meets your
expectations, but here's an extract which indicates what the WAI gets
to hear (or an indexing robot gets to index, for that matter): [...]
WAI ?
A comment on those "key features":

WWW pages don't really work like that, no matter how hard you might
wish it. "What you see" is not what others get (it's just one
possible rendering), and IBM HPR, or JAWS, to take just two examples,
will make a nonsense of your "pixel perfection". Your concept of
"Cross Browser compatible" is somewhat limited


John Doe wants to create a small web site to talk about him and his hobbies.
He doesn't know anything about web development except launching word and
saving as HTML. We offer him the possibility to create more advanced web
pages, without any knowledge, and we try to be as cross browser compatible
as possible. Now I'm sure some browsers won't be able to display the web
pages correctly but Mr. Doe is happy because most of his friends, family and
visitors are seeing the web site almost, if not exactly, as he designed
it... without any knowledge and in no time. Now if he wants it to be perfect
in all browser, he has to wait for updates or start learning web development
technics and patch the clean code he has produced using our program. Do you
really think it's that bad ?

Thank you for your comments, but I'm sorry you couldn't give me an answer
about the right property of absolute elements in Internet Explorer.

Best Regards,

John.
Jul 20 '05 #11

P: n/a
> (Oh wait, pink is /my/ default background color. You haven't specified
any. Hint: wherever you specify a color, you include a background color.)


Thank you for the hint ;)
John.
Jul 20 '05 #12

P: n/a
> It does in NS7.1.
Doesn't show in IE, cause you didn't set a specific height
on the div and the body.
But I changed some things, and it almost looks like your
example, but without absolute positioning.
http://locusmeus.com/test/testright.html
The left and right side aren't a problem, the bottom is.
The div needs a height, and the vertical margins seem to be
added to that height.
Different approach, same problem with total height of page:
http://locusmeus.com/test/testrightdifferent.html
Thank you very much for the help. Unfortunately absolute positionning is
mandatory for us.
Could you explain why it has to absolute positioned?
(not that it helps, I'm just curious)


As I answered in a previous message, I am developping a WYSIWYG html
generator. So all elements must be (almost) exactly positionned where the
user placed them. That's why I need absolute positionning.
Thank you again for your help.

John.
Jul 20 '05 #13

P: n/a
On Mon, 5 Apr 2004, jonjon wrote:
WAI ?
Aargh, I had an ominous feeling that was going to be the next
question.

http://www.google.com/search?q=wai+web , first couple of hits.
"Use the web, Luke". I'm sure the other readers around here will
draw their own conclusions.
John Doe wants to create a small web site to talk about him and his hobbies.
He doesn't know anything about web development except launching word and
saving as HTML.
He certainly doesn't know the first thing about saving as HTML, in any
real sense.

(He might have been fooled by finding his vendor's offer to save as
something which it laughably calls "HTML", but ho hum, you're going to
feed him a quite different but equally dubious fiction, instead of
making any attempt to enlighten him. It's looking as if you're not
even aware of the issues yourself.)
We offer him the possibility to create more advanced web pages,


I can't agree. "More advanced" web pages, in my world, are those
which capitalise on the benefits of the WWW (relative, to, say, PDF or
DOC formats) - not ones which attempt to nullify the benefits.

bye

Jul 20 '05 #14

P: n/a
"jonjon" <no**@for.now> wrote:
The clueless teaching the even more clueless, sheesh.


First our goal is not to "teach" as you say, then where is the hint for the
problem I first exposed from the knowloadgeable person you seem to be ?


Stop using absolute positioning, you most likely don't understand it and
are using it inappropriately, it is the cause of your difficulties.

--
Spartanicus
Jul 20 '05 #15

P: n/a
jonjon wrote:

Thank you very much for the help. Unfortunately absolute positionning is
mandatory for us.

Could you explain why it has to absolute positioned?
(not that it helps, I'm just curious)

As I answered in a previous message, I am developping a WYSIWYG html
generator. So all elements must be (almost) exactly positionned where the
user placed them. That's why I need absolute positionning.
Thank you again for your help.

John.


OK, You are developing a WYSIWYG HTML generator. But HTML is not a
WYSIWYG language. Adding CSS compounds the situation.

Microsoft Publisher will do what you describe. It uses tables and
invisible images to give precise, ridged, unyielding precision. It does
not scale with window size changes as a result.

The ability to scale and reflow with window size changes depends on
flexibility, i.e. the absence of absolutes.

"WYSIWYG HTML generator" is an oxymoron.

That's valid critique, but not especially useful. BUT, you have an
opportunity to do something useful here: develop a web-page-builder for
Joe Sixpack that exposes him to the flexibility of HTML+CSS, while doing
all the grunt work for him. Start with the concept of the Division as a
piece of real estate. Show how it can be fixed or variable in size.
Show how it can be rigidly attached to an adjacent division or, if boxed
in enough, can make an end-run to a space of its own. Show how it can
contain a graphic or text, or other divisions. Let him play with that
via drag-and-drop manipulation, plus a pop-up menu for things not easily
represented graphically (clear: right for example). Etc, etc.

Chris Beall

Jul 20 '05 #16

P: n/a
jonjon wrote:

however I'm developping a software
to ease the process of creating web pages (
http://www.dynamicarchitect.com )


Anybody that claims to make a pixel-perfect web page is either a liar or
a fool, perhaps both. You do no service to those you claim to help, you
are merely providing the means to create pages that will likely fail
miserably in any "non-standard" browsing environment. That helps no one,
least of all your clients.

There's already enough crap on the web, please don't add to the dung heap.

--
Reply address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 20 '05 #17

P: n/a
On Mon, 05 Apr 2004 19:21:44 GMT, Chris Beall <Ch*********@prodigy.net>
wrote:

"WYSIWYG HTML generator" is an oxymoron.


This cannot be stressed enough!

The whole point of web design is to abandon control over how the browser
renders the page. We can suggest and expect, sure, but never assume the
next user will see what the last user saw.
Jul 20 '05 #18

P: n/a
On Mon, 5 Apr 2004 19:14:02 +0200, jonjon <no**@for.now> wrote:
John Doe wants to create a small web site to talk about him and his
hobbies.
Good for him.
He doesn't know anything about web development except launching word and
saving as HTML. We offer him the possibility to create more advanced web
pages, without any knowledge, and we try to be as cross browser
compatible
as possible.
At first glance it is a noble goal. But it assumes the technology is that
simple, when it is not. You create the impression that the website
creation process is easy, when it is quite hard.

We already have a lot of poor websites because businesses don't recognize
that some idle manager is not going to be able to throw together a
competent web page in a few weeks.
Now I'm sure some browsers won't be able to display the web
pages correctly but Mr. Doe is happy because most of his friends, family
and
visitors are seeing the web site almost, if not exactly, as he designed
it... without any knowledge and in no time. Now if he wants it to be
perfect
in all browser, he has to wait for updates or start learning web
development
technics and patch the clean code he has produced using our program. Do
you
really think it's that bad ?


So long as you make it clear to the user that no existing program can do
it perfectly, and tell them what kinds of problems are to be expected when
using your software without retouching by hand, I'm not going to be
uptight.
Jul 20 '05 #19

P: n/a
> (He might have been fooled by finding his vendor's offer to save as
something which it laughably calls "HTML", but ho hum, you're going to
feed him a quite different but equally dubious fiction, instead of
making any attempt to enlighten him. It's looking as if you're not
even aware of the issues yourself.)


Please understand that our main goal is not to teach anything (well you can
still see the generated code from the actions you're making so you can learn
at least the syntax behind this). We surely aren't trying to fool anyone. We
just want to provide an easy to use tool for people who don't want to spend
time learning stuff they absolutely have no interest with. So you'd probably
say that if they do not have any interest in it, why are they using it ?
I'll just say that I personnaly have no interest in writting, I'm a bad
writer, I make spelling and grammatical errors (even more in english which
isn't my natural language by the way ;) but I'm glad I'm able to write so I
can send letters and cards to my friends and family, or write down my
shopping list... people are just as happy to be able to create their web
sites with minimum knowledge.
We offer him the possibility to create more advanced web pages,


I can't agree. "More advanced" web pages, in my world, are those
which capitalise on the benefits of the WWW (relative, to, say, PDF or
DOC formats) - not ones which attempt to nullify the benefits.


For what I've read, and please correct me if I'm wrong, HTML wasn't meant to
be what it is today. But it evolved by listenning to people's needs. One of
that evolution is the CSS, which allows me to define precisely where and how
something will appear on the page. Do you think CSS and its absolute
functionalities are not benefits enough to capitalise on for the sake of the
WWW ?

Thank you for your comments.

Best regards, John.
Jul 20 '05 #20

P: n/a
> At first glance it is a noble goal. But it assumes the technology is that
simple, when it is not. You create the impression that the website
creation process is easy, when it is quite hard.
It is hard indeed and that's my point! It shouldn't be that hard. We are
offering an alternative, and we surely do not force anyone to follow it. But
now I have a question for you, if people find it useful and like the way
they are creating their web pages, all in a WYSIWYG way, don't you think the
technology should listen too them and software developers and standards
should listen to what they want ? Or do you prefer telling them... no
there's no way but keep learning how they have defined it, or shame on you.
It's not like we didn't follow the standards, CSS allows us to create
absolute positionned elements, why shouldn't I use this possibility ? would
you say the guys behind that were stupid and this functionality shouldn't
have been there in the firste place ?
We already have a lot of poor websites because businesses don't recognize
that some idle manager is not going to be able to throw together a
competent web page in a few weeks.
Could you define what a "poor website" is ? Do you mean a web site following
standards that old browsers, almost not used anymore, can't correctly render
?
So long as you make it clear to the user that no existing program can do
it perfectly, and tell them what kinds of problems are to be expected when
using your software without retouching by hand, I'm not going to be
uptight.


Thank you for your comments.

Best regards, John.
Jul 20 '05 #21

P: n/a
> Anybody that claims to make a pixel-perfect web page is either a liar or
a fool, perhaps both. You do no service to those you claim to help, you
are merely providing the means to create pages that will likely fail
miserably in any "non-standard" browsing environment. That helps no one,
least of all your clients.

There's already enough crap on the web, please don't add to the dung heap.


I totally understand and respect your point of view. I've tried to answear
to this critisism in other messages, please feel free to argument.

Best regards, John.
Jul 20 '05 #22

P: n/a
> > "WYSIWYG HTML generator" is an oxymoron.

This cannot be stressed enough!

The whole point of web design is to abandon control over how the browser
renders the page. We can suggest and expect, sure, but never assume the
next user will see what the last user saw.


I should have probably said "WYSIWYG HTML generator using CSS (clearly
defined properties)". Why is that so bad ? Because some older browsers can't
understand CSS ? Should we have continued to use candles and stop creating
bulbs because electricity wasn't available everywhere ?

Thank you for your comments.

Best regards, John.
Jul 20 '05 #23

P: n/a
On Tue, 6 Apr 2004 00:46:55 +0200, jonjon <no**@for.now> wrote:
But
now I have a question for you, if people find it useful and like the way
they are creating their web pages, all in a WYSIWYG way, don't you think
the
technology should listen too them and software developers and standards
should listen to what they want ? Or do you prefer telling them... no
there's no way but keep learning how they have defined it, or shame on
you.
It's kinda like the joke we have at school - teaching would be a great job
if it weren't for the damn kids.

All I'm saying is that it's the nature of web design to realize that what
you see is not what you get. WYSIWYG software, when purporting to produce
HTML code, is a lie.

Now, if it's done reasonably well, and with respect to the user in that
they are made aware of the limitations of this way of doing things, I'm
cool.
It's not like we didn't follow the standards, CSS allows us to create
absolute positionned elements, why shouldn't I use this possibility ?
would
you say the guys behind that were stupid and this functionality shouldn't
have been there in the firste place ?


Not at all. Absolute positioning has its place.

Imagine producing a tool kit for someone with no experience fixing or
building. You are going to have to either explain what all these doodads
do, or you are going to have to make sure the hammer cannot be used on a
screw. Likewise, this software is being designed so people don't need to
learn HTML and CSS. Therefore the program must not allow code to be
misused.

I submit, respectfully, that if you cannot make absolute positioning work
the old-fashioned hard way, you'll never get a program to do it. You're
going to have to do experimentation. Fact is, there are a lot of things
like this that will pop up. Until you have a grasp of what a human web
author has to do to get things to work, you'll never be able to automate
it.
We already have a lot of poor websites because businesses don't
recognize
that some idle manager is not going to be able to throw together a
competent web page in a few weeks.


Could you define what a "poor website" is ? Do you mean a web site
following
standards that old browsers, almost not used anymore, can't correctly
render
?


I mean websites which fail in current browsers. I mean pages which look
great on one computer in the author's office but fall apart in browsing
situations that differ from that.

Read this ng to get an idea of what I'm talking about. We discuss this
constantly. Think about:

- platform
- screen size and resolution
- operating system
- browser make and version
- presence of Js and Flash
- ability to habdle images
- readability for aural browsers
- text browser compatability
etc....
- viewport size
Jul 20 '05 #24

P: n/a
jonjon wrote:

I should have probably said "WYSIWYG HTML generator using CSS (clearly
defined properties)". Why is that so bad ? Because some older browsers can't
understand CSS ?


No, it's bad because _you_ don't understand CSS, or how the web really
works, thus you will create a bad tool.

Unless a page is entirely made of graphics, you cannot absolutely
position every element on a page and have any confidence it will render
as intended, except in the precise browsing environment of the author.
What you are proposing is the same disaster that already comes out of
homestead.com and yahoo's page builder. We don't need any more of this
junk, thank you.

--
Reply address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 20 '05 #25

P: n/a
On Tue, 6 Apr 2004 00:47:00 +0200, "jonjon" <no**@for.now> wrote:
> "WYSIWYG HTML generator" is an oxymoron.
This cannot be stressed enough!

The whole point of web design is to abandon control over how the browser
renders the page. We can suggest and expect, sure, but never assume the
next user will see what the last user saw.


I should have probably said "WYSIWYG HTML generator using CSS (clearly
defined properties)". Why is that so bad ? Because some older browsers can't
understand CSS ?


No, that's not the problem. The point is that people have different
monitors, different window widths, different eyesight, different
preferred text sizes etc.

A WYSIWYG editor shows how the page will look at *one* particular text
size (etc). It encourages one to produce a design which looks very good
at that one combination of text size etc, but dreadful if the reader
selects e.g. a text size which is slightly larger.

Now you might be able to address this by providing a button that cycles
the editor view through half a dozen different combinations of text size
and window size, with one option for a text-browser simulation. That
would help.
Should we have continued to use candles and stop creating
bulbs because electricity wasn't available everywhere ?


Analogies are rarely a fruitful way of arguing, but a closer one would
be to say that it is not a good idea for manufacturers of radios and
shavers to produce only models which require mains electricity, given
that many people like to go camping.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #26

P: n/a
jonjon wrote:
But
now I have a question for you, if people find it useful and like the way
they are creating their web pages, all in a WYSIWYG way, don't you think the
technology should listen too them and software developers and standards
should listen to what they want ?


The WWW is a medium designed to be much more flexible than DTP, which is
good. So techniques used for DTP are not necessarily usable for the WWW.
And WYSIWYG editing limits necessary features of the WWW.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #27

P: n/a
jonjon wrote:
I should have probably said "WYSIWYG HTML generator using CSS (clearly
defined properties)". Why is that so bad ? Because some older browsers can't
understand CSS ?


No, because e.g.
* users may need and can use a different font size in their browsers,
* users may have different browser window sizes
* users may use a mobile device
* browsers allow for applying a user style sheet
* ...
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #28

P: n/a
Stephen Poley <sb******************@xs4all.nl> wrote:
> "WYSIWYG HTML generator" is an oxymoron.

This cannot be stressed enough!


Should we have continued to use candles and stop creating
bulbs because electricity wasn't available everywhere ?


Analogies are rarely a fruitful way of arguing,


:-) Anyone else spot the contradiction there? I always thought an
analogy was a rhetorical figure, now I learn it's a type of fruit
tree.

--
oxymoron: "English cricketer".
Jul 20 '05 #29

This discussion thread is closed

Replies have been disabled for this discussion.