How to change CSS if Javascript disabled. Please help.

Hi all,
So my pursuit for accessible and good looking pages
continues.....
I am working on a new website: XHTML, external CSS, PHP
driven.
I decided to use the nice Project Seven vertical scroll menu
for a looping newsbox. Works great with Javascript enabled and
opens as it should with Javascript disabled. However, I have the
scroll menu inside a div called "newsbox", which resides inside a
floated div. This of course causes the content to extend beyond the
main container.
Now to fix this issue what I would like to do is have the
Project Seven menu display when Javascript is enabled and when
Javascript is disabled I want to change the CSS of "newsbox" to
'overflow: scroll' so that the box still displays as a scroll box.
(This would keep my current design looking nice.)
I've looked at many solutions online but I need for it to
validate in XHTML.
All I want to be able to do is change that one line of CSS
for the "newsbox" div if Javascript is disabled.
I know this isn't really Dreamweaver related but I was hoping
someone might have a simple fix for this.
Any help or links to relevant online tutorials greatly
appreciated!
Thanks,
Rachelle

"Rockyjd" <[email protected]> wrote in
message
news:gi8r8o$olm$[email protected]..
> Hi Thierry,
>
> Yes, your suggestion is exactly the route I'm trying to
take. My problem
> is
> I'm a complete ignoramus when it comes to Javascript!
> So this is my current CSS for the div that contains my
scrolling menu:
>
> #newsbox {
> background-color: #FFF;
> height: 305px;
> width: 300px;
> position: relative;
> visibility: visible;
> z-index: auto;
> left: 0px;
> top: 0px;
> margin-bottom: 5px;
> margin-top: 1px;
> overflow: scroll;
> }
> I've set the default value as 'overflow:scroll' and when
Javascript is
> enabled
> I want it to change to 'overflow:hidden' (so those ugly
blue scroll bars
> disappear and my nice Javascript scroll menu then takes
over.)
>
> So would I write the Javascript as follows?
>
>
document.getElementById('newsbox').style.overflow='hidden';
>
> And then my next question is: where do I put this
declaration? In the
> <head>?
> In the external CSS file? If it's in the <head>
should it be in <script>
> tags
> or preceded by something to make it work?
> Sorry for all the questions but I was trying to add the
Javascript
> yesterday
> and it wasn't working so I am definitely doing something
wrong.
> As I said I'm a Javascript dunce so any and all help is
greatly
> appreciated!
Hi Rachelle
Yes it should be inside a script element in head, but you
can't call it
before "newsbox" is available. You'd need to call it onload
or move the
snippet in the code, after "newsbox".
Thierry | Adobe Community Expert | Articles and Tutorials ::
http://www.TJKDesign.com/go/?0
Spry Widgets |
http://labs.adobe.com/technologies/spry/samples/
[click on
"Widgets"]
Spry Menu Bar samples |
http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html

Similar Messages

  • Two iphones with the same id how do change them to separate ones please help

    is there a way to change it

    Read
    Read http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    If you wish to share an Apple ID with family members then read: http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/

  • My children enters wrong password several times on problem  my ipad ..., the was it is indicated that it was disabled ... how can i access my ipad thanks please help ... thank you

    my children enters wrong password several times on problem  my ipad ..., the was it is indicated that it was disabled ... how can i access my ipad thanks please help ... thank you

    If it's reached the point where you can't try re-entering the code then you will need to connect the iPad to the computer that you normally sync to and you should then be able to reset the iPad and re-sync your content to it - from http://support.apple.com/kb/HT1212
    If you repeatedly enter the wrong passcode, your iPhone, iPad, or iPod touch will be disabled for longer intervals before you can try again. After too many unsuccessful attempts, you won't be able to try again until you connect it to the computer with which you last synced it.
    You may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808

  • TS2446 Hi,My Apple ID has been disabled        Please help Thank you

    Hi,My Apple ID has been disabled        Please help Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you

    If changing your password does not solve then contact itunes support

  • How do I get PBS again?  Please help!!!

    I was able to get PBS when I first got Apple TV after putting in a code, but my cable company recently changed their channel lineup, and I can no longer get PBS on Apple TV.  I used to get PBS on channel 314 on my TV, but after speaking with my cable company, I now get it on channel 198, but I can't get anything at PBS on Apple TV. All I get when I go there is the "downloading circle" and nothing happens.  The cable company can't help, and I've written to PBS several times with no reply.  I thought maybe I could get a different code and start over, but I don't know how to do that.  Can anyone help, please.  PBS is one
    of the main reasons I bought Apple TV.  Thanks. 

    I don't know who vaszandrew is, but I (diamond2277) wrote How do I get PBS again?  Please help!!! 
    It got printed and I lost my page so I started over again, and the one above with my question showed             (dated May 2, 9:56 am) as if it were an answer to vasndrew.
    After I wrote, it occurred to me that maybe if I disconnect my Apple TV and reconnect it, I will get PBS, and it worked.  Now I don't need an answer.  Thanks to anyone who was going to answer!  I have to remember my usual answer to technical problems, UNPLUG, AND START AGAIN.

  • I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    Change your passwords.

  • I accidentally dropped my firewall, or openned it.  I checked it in system preferences and it is turned off but I can not find how to put it back up.  PLEASE HELP!

    I accidentally dropped my firewall, or openned it.  I checked it in system preferences and it is turned off but I can not find how to put it back up.  PLEASE HELP!  I obviously do not want to leave this open very long, if you get my drift.

    Did you "click the lock to make changes"

  • My apple account is disabled, please help me deal with as soon as possible!

    My apple account is disabled, please help me deal with as soon as possible!

    Change the password, but did not receive the letter to change the password

  • I logged onto my MacBook Air and it is asking me for my "local items" keychain password for several different things. I do not know what this is or how to get rid of it. Please help. Thanks.

    I logged onto my MacBook Air and it is asking me for my "local items" keychain password for several different things. I do not know what this is or how to get rid of it. Please help. Thanks.

    There are several possible causes for this issue. Please take each of the following steps that you haven't already tried, testing after each one, until it's resolved. Back up all data before making any changes.
    Step 1
    Follow the directions in this support article.
    Step 2
    Open the iCloud preference pane and uncheck the Keychain box. You'll be prompted to delete the local iCloud keychain. Confirm. Then re-check the box. Follow one of the procedures described in this support article to set up iCloud Keychain on an additional device.
    Step 3
    Open the Keychains folder as in Step 1. There should be a file in that folder with the name "login.keychain". If there is also a file iwith the name "login_renamed_1.keychain", then please do as follows:
    Rename login.keychain to "login-old.keychain".
    Rename login_renamed_1.keychain to "login.keychain".
    You can then close the folder.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Delete the login keychain from the keychain list. Choose Delete References when prompted, not Delete References & Files.
    Select
    File ▹ Add Keychain...
    from the menu bar. Add back the file now named "login.keychain". If any of your needed keychain items are missing from it, also add back the file now named "login-old.keychain". I suggest you transfer any needed items from that keychain to the login keychain, then delete it. The transfers are made by drag-and-drop in Keychain Access. You'll need to enter your password for each item transferred.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • ITunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    iTunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    It is likely a hardware failure
    http://support.apple.com/kb/TS3694?viewlocale=en_US#error1

  • TS4605 Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Well, iCloud has nothing to do with this.
    Do you have the built-in backup function Time Machine running on your Mac?
    See: http://support.apple.com/kb/ht1427

  • I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    I recently bought a dbx hardware compressor and am not quite sure how to use it in logic express 9. I hav a focusrite saffire 6 usb audio interface and am not dont how to use it in logic. Please help???

    MUYconfundido wrote:
    Pancenter,
    Thanks for the response, but I do not have a midi interface. I am using a midi to usb connector cable, thus bypassing the need for a Midi interface.
    The Mac reads the USB cable as a midi device, but not the keyboard that I am trying to use as a controller. I have tried it with my korg sp 300 and with my Nord Electro 2.
    Thoughts?
    Thanks,
    Tristan
    Tristan...
    This is what you have, correct?
    http://www.alesis.com/usbmidicable
    This from Alesis..
    "The AudioLink Series USB cable receives and outputs MIDI signal thanks to its internal interface. The USB-MIDI Cable connects plug-and-play to your Mac or PC for an all-in-one USB-MIDI solution."
    Notice, -internal interface-. What you have is a simple USB MIDI Interface. Most MIDI interfaces are USB.
    My point is (was), MIDI OUT of the Korg goes to the connector marked MIDI IN on the Alesis, those new to MIDI often get this wrong.
    pancenter-

  • I just updated my iPod touch and all my pictures are gone!!! How do I get them back? Please help!!!

    I just updated my iPod touch 4th generation to iOS 6.0.1 and all my pictures are gone!!! Everything else is there but my pictures! How do I get them back? Please help!!!

    If the photos were i your iPod's Camera Roll album (taken by or saved to the iPod you can:
    - If your PhotoStream is on you can get the last 30 days worth back. See that topic here:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Or you can restore from backup if you backed up when the photos were on the iPod.
    If the photos were synced to the iPod then you have to get them from where you got them the first time.

  • How to acess Database in I18N? Please help.

    How to acess Database in I18N? Please help.

    I have tried to overide the getContents() method of ListResourceBundle class but it returning an error at run time saying null Pointer exception.
    Here are the 2 codes resp.
    import java.util.*;
    public class Test1
         static String string ;
         public static void main(String args[])
    Locale locale = Locale.ENGLISH;
    ResourceBundle myResources =
    ResourceBundle.getBundle("MyResources", locale);
    string = myResources.getString("HelpKey");
    System.out.println(string);
    import java.util.*;
    import java.sql.*;
    public class MyResources extends ListResourceBundle
         static String[][] s3= null;
    String s6= null;
         String s7= null;
    public Object[][] getContents()
    Object[][] obj= (Object[][])dataBase();
              for(int i= 0; i< obj.length;++i){
                   for(int j = 0;j<obj.length;++j){
                        System.out.println("GGGGGGGG obj["+i+"]["+j+"]"+obj[i][j]);
              //s6=(String)obj[0][0];
         //     s6= obj[0][0].toString();
              //s7=obj[1][0].toString();
    Object[][] contents = { {s6},{s7}};
         return contents;
         private static String[][] dataBase()
         {           try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con=DriverManager.getConnection("jdbc:odbc:DSN");
                   PreparedStatement stat= con.prepareStatement("Select Value,Key from Table1 where Key= ?");
                   String s1= "HelpKey";
                   stat.setString(1,s1);
                   ResultSet rs= stat.executeQuery();
                   while(rs.next())
                        String s2= (String)rs.getString("Key");
                        String s4= (String)rs.getString("Value");
                        String[][] s3 ={{s2},{s4}};
              catch(Exception e)
              e.printStackTrace();
         return s3;

  • HT1430 my ipod 4 is disabled.Please help!!

    IPOD IS DIsabled.Please help!!!!

    Recovery mode will work. BUT if your like most people you probably dont want to lose all your information.  Sometimes if you just plug your ipod into a computer you have used before it will just unlock it for you! Sometimes if that doesnt work you can try to just back up your stuff to your computer unless you already have your stuff backed up to iCloud.  
    In that case get a computer get on any internet provider and go to www.icloud.com sign in and go to Find My iPhone.  From there click on your devise and do a remote wipe.  Personally I find this much easier than to have to mess with downloading software on your computer and all the other crap.
    Hope this help!

Maybe you are looking for

  • Using a string or char as a class when calling a method

    Is there a way to take the string.charAt(int) method and use it as a stand in for a class that is one character long? (Examples below, as I'm sure that question makes no sense out of context.) Something like (note the last line): import java.util.Sca

  • It says to add the shuffle to my devices list..where do I find that I cant find it in the menu

    I can't sync my daughters shuffle to my itunes account..can't find "devices" in the menu..help!

  • Best TV?

    Help please! I have a 5yr old CRT Mitsubishi, 55" rear projection, was very nice, but now has failed--awful colors, reverts to partial b&w, wavy color lines at top, jittery picture. Take 20min or more to 'warm up' but never gets very good. Reputable

  • Assign logical components to Test Case Management

    Hi , I have my scenario where I had uploaded the test cases in SOLAR02. And created the rest of the Test plans, packages and so on. My logical components are: 100 DEV 130 Single Test 200 QAS (Integral Test) 300 PRD I need to know which is the way to

  • Stacked canvas is overlapping the content canvas

    Hi all, I am writing a program where I have one content canvas and a button to display the stacked canvas on button click. But when I run the form, 'only' the stacked canvas is showing-up even though I have hidden the stacked canvas in the on-new-for