[Cialug] OT: Issues with CSS

Bailey, Jonathan C cialug@cialug.org
Fri, 4 Mar 2005 19:39:31 -0600


Looks like the issue is the JavaScript doing the following:

document.getElementById('divname').style.display =3D 'block';

and the CSS attempts to set it to none, but it shows up as setting style =
within the original DIV tag.


Jon

-----Original Message-----
From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On Behalf
Of Bailey, Jonathan C
Sent: Friday, March 04, 2005 7:32 PM
To: cialug@cialug.org
Subject: RE: [Cialug] OT: Issues with CSS


Ok... I'm a bit closer to fixing it... The DIVs I'm having problems with =
are written to with JavaScript. If I make a DIV with class=3Dmenubox and =
id=3Dwhatever, it works fine. If I write content to that DIV, it won't =
disappear. Here's the (basic) code I'm using for that....

document.getElementById('divname').innerHTML =3D 'whatever';



Jon

-----Original Message-----
From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On Behalf
Of timwilson011@mchsi.com
Sent: Friday, March 04, 2005 7:26 PM
To: cialug@cialug.org
Subject: RE: [Cialug] OT: Issues with CSS


Ok, I guess I should've kept working on it a little longer.  Your code =
is
incorrect.  You need to have quotes around "text/css".  Here's the new =
code that
I got to work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang=3D"en">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DISO-8859-1">
<title>Test</title>
<link rel=3Dstylesheet href=3Dadmin.css type=3D"text/css" media=3Dall>
<link rel=3Dstylesheet href=3Dadmin-print.css type=3D"text/css" =
media=3Dprint>

<body>
<div class=3Dmenubox id=3Dnav_domains>content</div>
<div class=3Dmenubox>content</div>
</body>
</html>

On the CRT, both content boxes showed up.  When I printed it, neither =
showed up.
 Is that what you were looking for?

--
Tim W.


> Do you have the Firefox Web Developer extension?  It's nice.  I copied =
your code
> and tried to validate it and it failed.  I looked at the W3C doc, and =
found this
> as an example:
> <LINK rel=3D"stylesheet" media=3D"aural" href=3D"corporate-aural.css" =
type=3D"text/css">
> <LINK rel=3D"stylesheet" media=3D"screen" =
href=3D"corporate-screen.css"=20
> type=3D"text/css">
> <LINK rel=3D"stylesheet" media=3D"print" href=3D"corporate-print.css" =
type=3D"text/css">
> <LINK rel=3D"stylesheet" href=3D"techreport.css" type=3D"text/css">
> <STYLE media=3D"screen, print" type=3D"text/css">
>     p.special { color: rgb(230, 100, 180) }
> </STYLE>
>=20
> I'm still learning this stuff, but it looks like they're saying to =
define a
> style with media types you want.  Check out this link:
>=20
> http://www.w3.org/TR/html401/present/styles.html#h-14.4.1
>=20
> --
> Tim W.
>=20
>=20
> > But firefox has the same action as IE...
> >=20
> > -----Original Message-----
> > From: cialug-admin@cialug.org [mailto:cialug-admin@cialug.org]On =
Behalf
> > Of Dave J. Hala Jr.
> > Sent: Friday, March 04, 2005 6:58 PM
> > To: Cialug
> > Subject: Re: [Cialug] OT: Issues with CSS
> >=20
> >=20
> > IE5 and IE6 sometimes does some funky stuff with CSS, that Mozilla =
and
> > Firefox handle properly...
> >=20
> >=20
> > On Fri, 2005-03-04 at 18:50, jcbailey@code0.net wrote:
> > > I don't THINK so.... I've only tested it with IE5/IE6/FF 1.0.1...
> > >=20
> > >=20
> > > Jon
> > >=20
> > > > John:
> > > > Using Mozilla Firefox 1.0 on Linux, and Konqueror 3.3.2 on =
Linux, I
> > > > see both DIVs disappear. To test, I also added a DIV without a =
class,
> > > > just to make sure. Could it be a browser rendering issue?
> > > >
> > > > On Fri, 4 Mar 2005 17:16:41 -0600 (CST), jcbailey@code0.net
> > > > <jcbailey@code0.net> wrote:
> > > >> Yes, this is a repost for anyone that is also on the CIAPUG =
list....
> > > >>
> > > >> ---snip---
> > > >>
> > > >> First, here is the HTML - next, the issue... (well, at least =
the
> > > >> relavent
> > > >> stuff).
> > > >>
> > > >> page.htm:
> > > >> <link rel=3Dstylesheet type=3Dtext/css href=3Dadmin.css =
media=3Dall>
> > > >> <link rel=3Dstylesheet type=3Dtext/css href=3Dadmin-print.css =
media=3Dprint>
> > > >> <div class=3Dmenubox id=3Dnav_domains>content</div>
> > > >> <div class=3Dmenubox>content</div>
> > > >>
> > > >> admin.css:
> > > >> .menubox {
> > > >>         padding:        2px;
> > > >>         width:          194px;
> > > >>         margin-top:     10px;
> > > >>         margin-bottom:  10px;
> > > >>         border:         1px solid #b1b1b1;
> > > >>         background:     #fff;
> > > >>         font-family:    Sans-Serif;
> > > >>         font-size:      10pt;
> > > >> }
> > > >>
> > > >> admin-print.css:
> > > >> .menubox { display: none; }
> > > >>
> > > >> The issue is that when I switch to the print format, any DIVs =
with an ID
> > > >> tag set don't disappear. The ones with no ID tag set disappear =
like they
> > > >> should. Any ideas?
> > > >>
> > > >> Jon
> > > >>
> > > >> _______________________________________________
> > > >> Cialug mailing list
> > > >> Cialug@cialug.org
> > > >> http://cialug.org/mailman/listinfo/cialug
> > > >>
> > > >
> > > >
> > > > --
> > > > Mark Hesseltine
> > > > mailto:markhesseltine@gmail.com
> > > > _______________________________________________
> > > > Cialug mailing list
> > > > Cialug@cialug.org
> > > > http://cialug.org/mailman/listinfo/cialug
> > > >
> > >=20
> > >=20
> > > _______________________________________________
> > > Cialug mailing list
> > > Cialug@cialug.org
> > > http://cialug.org/mailman/listinfo/cialug
> > --=20
> >=20
> > Open Source Information Systems (OSIS)
> > Dave J. Hala Jr. <dave@osis.us>
> > 641.485.1606
> >=20
> > _______________________________________________
> > Cialug mailing list
> > Cialug@cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> > _______________________________________________
> > Cialug mailing list
> > Cialug@cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> _______________________________________________
> Cialug mailing list
> Cialug@cialug.org
> http://cialug.org/mailman/listinfo/cialug
_______________________________________________
Cialug mailing list
Cialug@cialug.org
http://cialug.org/mailman/listinfo/cialug
_______________________________________________
Cialug mailing list
Cialug@cialug.org
http://cialug.org/mailman/listinfo/cialug