/    Sign up×
Community /Pin to ProfileBookmark

css javascript expression error

I am using a css layout template (found at : [url]http://www.webproducer.at/flexible-layout[/url]).
It uses a seperate css for internet explorer to implement max-width using a javascript expression.

width: expression( (d = document)
&& (fs = d.getElementById(’em’).offsetWidth)
&& (po = 2 * fs)
&& (bo = 3)
&& (min = 50 *
fs)
&& (max = 70 * fs)
&& (cw = d.body.clientWidth)
&& (px = ‘px’)
&& (cw – po >= max + bo ? max + px : cw – po <= min + bo ? min + px : ‘auto’)
);

here are the notes that came with it:

About the weird dynamic property expression

fs = font-size (from the #em element)
min = min-width
max = max-width
po = padding offset (from the body)
bo = border offset (from the #main container, IE 6 seems to need one additional px)
cw = client width
px = pixel

Now for some reason this is conflicting with any php page I have, it works fine for html.
And I have traced the root of the problem to this expression.
Since I don’t know javascript, I can’t see if it is written properly or not, and I do not understand why it is giving me errors.

Here is the website:

[url]http://janjaniszewski.ca[/url]
(you have to use ie to see the errors)

Any help will be much appreciated, and will save me tons of time moving the website to a new layout.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ashia spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...