Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
! important - finally found a situation where it works!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Philip Herlihy  
View profile  
 More options Jan 8, 10:09 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Sun, 8 Jan 2012 15:09:00 -0000
Subject: ! important - finally found a situation where it works!
I finally came across a situation where the ! important qualifier makes
a difference.

Many's the time I've vainly added it to some CSS directive (as a sort of
"pretty please") only to have the browser mock my efforts, but this time
it did the trick.

Some readers may remember my "walks" page.  I've just added the first
"meeting point" map, using a service from the Ordnance Survey which
provides maps in a DIV conveniently id'd ="map".

I simply couldn't get the thing to centre, using
   margin: 2px auto 24px auto.
When I created an identical DIV id="maptest", with the selectors
applying the same CSS to both:

div#map,
div#maptest {
   ...
   margin: 24px auto 24px auto;
   ...

}

..then the 'maptest' div was correctly centred, but the 'map' one was
left-aligned in the viewport.  Adding ! important to the margin
directive did the trick, with consistent results in IE9, Chrome, Firefox
and Safari.  Presumably this now overrides something in the JavaScript
provided by Ordnance Survey.  I haven't gone through it (other deadlines
beckon).  This is the first time that the !important directive has
solved a problem - I wonder how often this happens.

The page concerned is:
http://www.walthamsoft.com/foef/osmaps/2012-0114.htm
and the CSS file is at:
http://www.walthamsoft.com/foef/osmaps/maps.css

The OS maps are lovely, but you have to apply for a (free) key, and
register the hosting domain with the OS to get the maps to work, so it's
not that easy to provide a demo page which can be tinkered with.
--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 8, 3:57 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Mon, 09 Jan 2012 07:57:17 +1100
Local: Sun, Jan 8 2012 3:57 pm
Subject: Re: ! important - finally found a situation where it works!
In article <MPG.2973c1db6b2356c2989...@news.demon.co.uk>,
 Philip Herlihy <bounceb...@you.com> wrote:

Your important is more important than their important:

div.olMap {
    ...
    ...
    margin: 0px!important;
    ...

}

<g>

I have on rare occasions thrown an !important in for testing and
I don't blame you. Generally though, it niggles at me that I have
not got to the fundamentals. In your case you might not have full
control over someone else's code.

--
dorayme


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Herlihy  
View profile  
 More options Jan 9, 9:18 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Mon, 9 Jan 2012 14:18:28 -0000
Local: Mon, Jan 9 2012 9:18 am
Subject: Re: ! important - finally found a situation where it works!
In article <dorayme-25832D.07571709012...@news.albasani.net>,
dora...@optusnet.com.au says...

I'm impressed - where on earth can you find that?  I've now skimmed all
three JS files, and although I can see obscure references to 'CSS' I
didn't pick up an external file link, nor the word "important".  Are you
simply inferring that some directive equivalent to the above must be
there somewhere, or (quite likely) am I missing it?

You're right about not having control of someone else's code.  I do
rather distrust the "!important" directive.  It reminds me of a joke
language I dreamed up with a colleague which had the "come from" command
(to replace the unsafe "go to" of course) and qualifiers "sometimes" and
"usually".

--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 9, 3:24 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Tue, 10 Jan 2012 07:24:21 +1100
Local: Mon, Jan 9 2012 3:24 pm
Subject: Re: ! important - finally found a situation where it works!
In article <MPG.2975077118ef8072989...@news.demon.co.uk>,
 Philip Herlihy <bounceb...@you.com> wrote:

I would like to be able to say I mounted an operation for my men
(I keep a team for difficult jobs) to get into the building where
the server is kept, and that they got at it after hours. But, the
unexciting truth is simply that in Firefox, using the Web
Developer tools (you can download them and they are free), I
perused under the Edit CSS menu and it was there under a sheet
called "style.css" third along after "foef.css" and, presumably,
your "maps.css".

> You're right about not having control of someone else's code.  I do
> rather distrust the "!important" directive.  It reminds me of a joke
> language I dreamed up with a colleague which had the "come from" command
> (to replace the unsafe "go to" of course) and qualifiers "sometimes" and
> "usually".

<g>

--
dorayme


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Herlihy  
View profile  
 More options Jan 10, 7:33 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Tue, 10 Jan 2012 12:33:27 -0000
Local: Tues, Jan 10 2012 7:33 am
Subject: Re: ! important - finally found a situation where it works!
In article <dorayme-718B0D.07242010012...@news.albasani.net>,
dora...@optusnet.com.au says...

Well, I opened everything which the base html file had links to,
including the 2,891 lines of the file ...openspace.js (which you may not
be able to open without the right key, and on the right domain).  
Embedded in some very long lines there is indeed a small number of
references to "style.css", and the declarations you found are in there.

It just goes to show that there's always some tool (often already on
your desktop) which can save a lot of work!  IE9 has similar developer
tools, and I'll pay them more attention in future!

I must say that this file confirms my view (as an old-school software
engineer) that JavaScript is invariably written by folk who simply don't
get that computers understand only binary, and everything else exists
solely to facilitate understanding by human readers.  Yuk!  I once
quickly solved a tricky data-merging problem with a couple of (long)
lines of Unix shell script.  The file that went into the source-code-
control library had almost 200 lines of comment explaining how the other
two worked. Some time later I met another engineer who'd inherited my
work, and he'd never seen a shell-script before, so he was glad of it.  
I wonder how many lines of comment would be needed for an intermediate
JS coder to understand 'openspace.js'?

--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben C  
View profile  
 More options Jan 11, 5:44 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Ben C <spams...@spam.eggs>
Date: Wed, 11 Jan 2012 04:44:45 -0600
Local: Wed, Jan 11 2012 5:44 am
Subject: Re: ! important - finally found a situation where it works!
On 2012-01-08, Philip Herlihy <bounceb...@you.com> wrote:
[...]

> The page concerned is:
> http://www.walthamsoft.com/foef/osmaps/2012-0114.htm
> and the CSS file is at:
> http://www.walthamsoft.com/foef/osmaps/maps.css

> The OS maps are lovely, but you have to apply for a (free) key, and
> register the hosting domain with the OS to get the maps to work

They certainly are lovely. Well done on getting that working. I applied
for the key once but never got around to doing anything with it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 11, 7:52 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Wed, 11 Jan 2012 23:52:52 +1100
Local: Wed, Jan 11 2012 7:52 am
Subject: Re: ! important - finally found a situation where it works!
In article <slrnjgqq0t.kb3.spams...@bowser.marioworld>,
 Ben C <spams...@spam.eggs> wrote:

> On 2012-01-08, Philip Herlihy <bounceb...@you.com> wrote:
> [...]
> > The page concerned is:
> > http://www.walthamsoft.com/foef/osmaps/2012-0114.htm
> > and the CSS file is at:
> > http://www.walthamsoft.com/foef/osmaps/maps.css

> > The OS maps are lovely, but you have to apply for a (free) key, and
> > register the hosting domain with the OS to get the maps to work

> They certainly are lovely. Well done on getting that working. I applied
> for the key once but never got around to doing anything with it.

Yes, I agree, nice indeed.

For what it is worth, consider

div#map {
   ...
   width: 40em;
   height: 30em;
   ...

}

rather than the px widths used. Gives users a control to get
quite big then.

Or maybe a link to a whole page where there is just the map so
users can see the context bigger without the map details being
too small as a result.

--
dorayme


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Herlihy  
View profile  
 More options Jan 11, 5:15 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Wed, 11 Jan 2012 22:15:14 -0000
Local: Wed, Jan 11 2012 5:15 pm
Subject: Re: ! important - finally found a situation where it works!
In article <slrnjgqq0t.kb3.spams...@bowser.marioworld>,
spams...@spam.eggs says...

> On 2012-01-08, Philip Herlihy <bounceb...@you.com> wrote:
> [...]
> > The page concerned is:
> > http://www.walthamsoft.com/foef/osmaps/2012-0114.htm
> > and the CSS file is at:
> > http://www.walthamsoft.com/foef/osmaps/maps.css

> > The OS maps are lovely, but you have to apply for a (free) key, and
> > register the hosting domain with the OS to get the maps to work

> They certainly are lovely. Well done on getting that working. I applied
> for the key once but never got around to doing anything with it.

It's actually quite simple to use.  The key gets embedded in the code
that the OS tool generates, so you don't need to 'deploy' it yourself.  
You do have to register the domains you're going to use with OS.

You have to log on to the web builder:
https://openspace.ordnancesurvey.co.uk/osmapapi/mapbuilder

Then follow the stages in the boxes on the right, and finally collect
your code.  I paste that into a file, and then graft the relevant bit
(everything in the <head> except for the <title>) into the page on which
I'm working.  One tip is always to delete all markers first - or if
anyone really zooms out they'll see markers left over from a previous
editing session!

It's a great service, and it's great that a government department has
decided to give away data (and these tools) as a public service.  
Whatever next?

--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Herlihy  
View profile  
 More options Jan 11, 5:21 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Wed, 11 Jan 2012 22:21:10 -0000
Local: Wed, Jan 11 2012 5:21 pm
Subject: Re: ! important - finally found a situation where it works!
In article <dorayme-61209A.23525111012...@news.albasani.net>,
dora...@optusnet.com.au says...

Those are fixed dimensions taken from the sample page generated by the
builder tool - it's clear from using it that there are only three sizes
of map available.  I think I'll leave well alone!  (Coward...)

--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 11, 7:12 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Thu, 12 Jan 2012 11:12:44 +1100
Local: Wed, Jan 11 2012 7:12 pm
Subject: Re: ! important - finally found a situation where it works!
In article <MPG.29781ba756b8a2c5989...@news.demon.co.uk>,
 Philip Herlihy <bounceb...@you.com> wrote:

You might be surprised! By simply altering the div#map widths and
heights, to even double the px that are there at the moment or
changing to em, you can get a really nice big view of it. I tried
it with above and also with

div#map {
   ...
   ...
   width:1080px;
   height:880px;

}

--
dorayme

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gus Richter  
View profile  
 More options Jan 11, 8:42 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Gus Richter <gusrich...@netscape.net>
Date: Wed, 11 Jan 2012 20:42:04 -0500
Local: Wed, Jan 11 2012 8:42 pm
Subject: Re: ! important - finally found a situation where it works!
On 1/11/2012 7:12 PM, dorayme wrote:

> div#map {
>     ...
>     ...
>     width:1080px;
>     height:880px;
> }

Are you forgetting percentage values?

--
Gus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 12, 6:54 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Thu, 12 Jan 2012 22:54:18 +1100
Local: Thurs, Jan 12 2012 6:54 am
Subject: Re: ! important - finally found a situation where it works!
In article <jeldp9$3j...@dont-email.me>,
 Gus Richter <gusrich...@netscape.net> wrote:

> On 1/11/2012 7:12 PM, dorayme wrote:
> > div#map {
> >     ...
> >     ...
> >     width:1080px;
> >     height:880px;
> > }

> Are you forgetting percentage values?

Not exactly. I mentioned px and ems, I always like to hold
something back, a bit like the US Marshal in The Fugitive in the
storm water tunnel, he lost one gun but had another strapped to
his ankle which he brought out at the appropriate moment.

Width % is OK if you use em or px for height in this map case.
You get nothing if you use % for both width and height, and
nothing if you omit a height instruction altogether in map.css.
So a little complexity is involved here.

--
dorayme


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Philip Herlihy  
View profile  
 More options Jan 12, 7:29 am
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Philip Herlihy <bounceb...@you.com>
Date: Thu, 12 Jan 2012 12:29:36 -0000
Local: Thurs, Jan 12 2012 7:29 am
Subject: Re: ! important - finally found a situation where it works!
In article <dorayme-D0E3ED.11124412012...@news.albasani.net>,
dora...@optusnet.com.au says...

Yes, I am surprised - it certainly works.  I was rather uneasy that it
might break the OS code (or conceivably the terms).  I've tried it, but
I think I prefer the original size, so I'll stick with that.

Curious to know how you're viewing it with these changes, as I thought
the maps only rendered if served from my domain.  Are you using a
browser-based style-sheet?  Having asked that, it does render on my
development machine.  My ISP gives its customers each a subdomain, and I
may have registered that (can't remember - it's not the sort of thing
you write down...).

--

Phil, London


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gus Richter  
View profile  
 More options Jan 12, 3:21 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Gus Richter <gusrich...@netscape.net>
Date: Thu, 12 Jan 2012 15:21:34 -0500
Local: Thurs, Jan 12 2012 3:21 pm
Subject: Re: ! important - finally found a situation where it works!
On 1/12/2012 6:54 AM, dorayme wrote:

Right. I was thinking % for width only. I brought this up only to
prevent horizontal scrolling with width:1080px;

--
Gus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile  
 More options Jan 12, 6:34 pm
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <dora...@optusnet.com.au>
Date: Fri, 13 Jan 2012 10:34:17 +1100
Local: Thurs, Jan 12 2012 6:34 pm
Subject: Re: ! important - finally found a situation where it works!
In article <MPG.2978e283709ec22d989...@news.demon.co.uk>,
 Philip Herlihy <bounceb...@you.com> wrote:

Sure, just was mentioning that you can and also that some people
might like to be able to see more context, and not necessarily on
the page concerned. There could be a link to another page with
just the map and the width be in either ems, lots of pxs or, as
Gus, pointed out, in % (which would be the best for a linked page
with just the map, providing the most flexibility).

About %, if you wanted a % height as well, you would need to  
bypassing the reason that height in % does not work. Work it so
the map itself is a percentage height of its container, ensuring
the container of the map has a % height and this container's
container, if there is one is heighted, all the way back to the
HTML element, all at 100% say. Have not gone into this, but it
could be something for a rainy slow day.

> Curious to know how you're viewing it with these changes, as I thought
> the maps only rendered if served from my domain.  Are you using a
> browser-based style-sheet?  Having asked that, it does render on my
> development machine.  My ISP gives its customers each a subdomain, and I
> may have registered that (can't remember - it's not the sort of thing
> you write down...).

Yes, there are various facilities to see what things will do if
your server were supplied different css. It's a bit like being
unable to actually change God's mind, He being Very Stubborn and
Intransigent but imagining the consequences of a softer side to
Him.

<http://chrispederick.com/work/web-developer/>

--
dorayme


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »