Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    4
    Member #
    37562

    Need help with coding for CSS ID tag with space in the name

    At work, we have and external website that is very basic and ugly. Lot's of gray and white colors. So I decided to start working on making a custom CSS to apply to the site from the Accessibility menu in IE. I have changed several colors already. There are a few I am having issues with. For example, one line has code similar to:

    Code:
    id="main desk"
    inside an anchor link. There are several CSS ID's with spaces in their names.

    Problem is, I can't find any way to change the code for any ID with a space in it...

    I've tried

    #main
    #desk
    #main#desk
    #main desk
    #maindesk
    #"main desk"

    And nothing works. Any ideas?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Put a dash or an underscore in that id and edit the CSS accordingly. Notepad++ can do a global find/replace if you need to go there.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    4
    Member #
    37562
    I can't. It's an external site that I do not have access to.

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    It's a long-shot, but if you can inject JS, see if you can change the ID, like so:
    Code:
    document.getElementById('main desk').id = 'maindesk';
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    That doesn't make sense. If it's an external site that you don't have access to, how in the world are you going to edit the CSS for it?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Junior Member
    Join Date
    Oct 2013
    Posts
    4
    Member #
    37562
    With a custom user stylesheet that IE let's you apply. In IE, under Tools, Internet Options, Accessibility, User Style Sheet..

    You can use it to change any site or to completely ignore styles, colors, sizes, etc.

  8. #7
    Junior Member
    Join Date
    Oct 2013
    Posts
    4
    Member #
    37562
    I'll see if I can do an injection. It would be a pain to repeat every time but if it works it's worth it. I'll edit this post later and let you know if it works.. We're stuck on IE8 so I imagine JS injection should work...



    Edit: Doesn't seem to let me inject anything...
    Last edited by rybussell; Oct 30th, 2013 at 11:28 AM.

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Ahhh okay. I see what you're trying to do.

    Honestly, dude, you're probably spinning your wheels. If you're going to do something like this, what may be better is to download a local copy of the page you're trying to play with (which you can do from within IE by Saving it) and mess around to figure things out.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  10. #9
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Does the element you're trying to select have any classes?
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:59 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com