SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: CSS and Images

Hybrid View

  1. #1
    SitePoint Zealot dkilburn's Avatar
    Join Date
    Jul 2000
    Location
    Inyokern, CA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After reading through a dozen online tutorials, I am still searching for an answer to thie problem.

    I would like to place and IMG selector on my webpages so that I can change it from the stylesheet. For example: I've got an email image on all of my class pages. If I decide to change the picture, I have to edit each page. I would like to include that in the stylesheet (similiar to a background image) and reference it on the webpages.

    So far I have this in my css file:
    IMG.email
    {
    source: url("../graphics/pandamail.gif");
    width: 122px;
    height: 97px;
    }

    and this in my html file:

    <a href="mailto:dekilbur@pc.cc.ca.us"><img class="email"></a>.

    It places a box, but the image does not show up (the URL is correct). Is this possible to do? I would love to know the correct syntax for the IMG src.

    Thank you for your time. I greatly appreciate it!!



    ------------------
    Debby Kilburn
    http://www.jps.net/dkilburn

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sorry the URL attribute is only good for background images and unordered lists as of yet.

    You could make a layer and place a background image in it then use a transparent image in the layer for your link.

    It will take a little thinking but you could come up with a viable solution.

    ------------------
    Wayne Luke - Sitepoint Forums Administrator
    Digital Magician Magazine - MetaQuark Creations (Coming Soon)
    sitepoint@digitalmagician.com

  3. #3
    twashington
    SitePoint Community Guest
    for making code changes on multiple page i use editpad. it will do a find and replace on every page currently open. i have never been able to open more pages than it can handle. we can't do verything with coding, but we can do everything!

    ------------------
    That's just my opinion
    t.washington@visto.com

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about using an external javascript file that is just the necessary document write statements for that image and link ... and then having it hard coded in your pages as

    <script language="javascript" src="email.js"></script>

    Editing the single external js script will make the changes occur on all pages.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •