Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorhenk
    • CommentTimeJun 28th 2006
     permalink
    Hi there,
    Ill get right to the point, my problem is this:
    I wanted a CSS extension to change a image on a certain website into another image i have stored on my harddisk. Problem is that i dont have acces to the website page itself (cant edit it). I read some tutorials and stuff and came up with the following:
    img[src="http://www.somewebsite.com/Themes/classic/images/on.gif"] {src: "c:\bla.bmp";}
    Sadly, that doesn't work at all.
    Thanks alot for reading this and thanks even more if you can tell me what i am doing wrong.

    Im not native english so sorry for any grammar errors.
    • CommentAuthordaomen
    • CommentTimeJun 29th 2006
     permalink
    i have to say: what?

    you want to change an already existing sites image to another image with css?
    you cant change images to be another images in a site, css isnt meant to change other sites images to another images that you have in your harddrive.
    css is for making layouts with. or have i missed something?
    •  
      CommentAuthornifkin
    • CommentTimeJun 29th 2006
     permalink
    Yeah, that's not really what CSS does.

    In opera I'm not sure what else to tell you. In firefox you could install Greasemonkey and write yourself a user script (JS) that would do it for you.
    •  
      CommentAuthorSpookyET
    • CommentTimeJun 29th 2006
     permalink
    Opera comes with a Greasemonkey clone, or maybe Greasemonkey cloned Opera: http://www.opera.com/support/tutorials/userjs/ .
    • CommentAuthorhenk
    • CommentTimeJun 29th 2006 edited
     permalink
    Oh :(

    The way i see it images are an important part of styling a website! Imagine buttons that would not look good with the text- and background color you defined in your CSS. (i have to admit it would be useless to specify another image in your CSS since you'd still have to actually create that image with paint shop pro or paint.)

    Let me explain the way i want to use CSS. Opera comes with a few pre-defined CSS files. One of them is really simple and i used to gain more knowledge about CSS at first. This is how it originally looks:
    @charset "UTF-8";
    /*
    Name: Hide non-linking images
    Version: 1.01
    Author: Opera Software ASA
    Description: This style sheet hides images that do not serve a navigation purpose.

    Copyright © 2003 Opera Software ASA.
    */
    img {display: none !important;}

    a img {display: inline !important;}

    It works fine and the code is pretty self explaining. So now i thougt "if it can block certain images and others not, i could modify this code to CHANGE a certain image in another one."
    This may not be the way CSS is intended to be used, but if possible it is exactly what i need. I know it's used by webmasters to style an entire website without changing every html file.

    Some resource i used:
    http://www.yourhtmlsource.com/stylesheets/csslinks.html
    (the last part called 'Image Links' seems interesting if you say "it isnt possible")

    Any thoughts?

    I will look into that greasemonkey link later, thanks for posting it. Yet my first objective remains to solve this problem using CSS.
    (I also dont know how to write a js, but as said, its not my main concern at this point)
    •  
      CommentAuthornifkin
    • CommentTimeJun 29th 2006 edited
     permalink
    the last part called 'Image Links' seems interesting if you say "it isnt possible"

    Changing the border styling (decoration of a piece of content) and changing the image file source attribute (manipulating actual HTML code) are two very different things. You can't manipulate the code on the page with CSS, just the way it's decorated in the browser. If you want to actually make changes to the document itself you'll need to use javascript to do it.
  1.  permalink
    I'm not positive what this guy is trying to do, but it seems like he might want to change the browser default style sheet?
    • CommentAuthorhenk
    • CommentTimeJun 30th 2006
     permalink
    Changing the border styling (decoration of a piece of content) and changing the image file source attribute (manipulating actual HTML code) are two very different things. You can't manipulate the code on the page with CSS, just the way it's decorated in the browser.
    Ok, thats all i needed to know.
    I read somewhat into javascripting and think i'll manage to do what i wanted to with that. Again GREAT thanks to the person(s) providing that Opera link.

    I'm not positive what this guy is trying to do, but it seems like he might want to change the browser default style sheet?
    Some people say its rude to talk about someone in third sence in his presence. Apart from that, i dont know exactly what you mean. Opera is capable of using stylesheets stored in its styles-directory to override the style the webmaster intended his/her page to use. The local stylesheet will overrule all styling used in a page. Example: some people dont see some colors well so they'd like the "black on white" stylesheet Opera provides by default. If such a person encounters a website with unclear colors he/she could switch on the stylesheet in the View>Style menu.
    Anyway. If it is not possible to change images with css any further discussion on this point is useless.
    • CommentAuthorhenk
    • CommentTimeJul 1st 2006
     permalink
  2.  permalink
    After reading this post, I have to say what daomen said in the first place: what?! CSS is a cascading style-sheet for a certain web page that you already control... CSS doesn't "do" anything. It pretty much only helps with asthetics... if that makes sense.
Add your comments
    Username Password
  • Format comments as (Help)