Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About anonymous_bosch

  • Rank
  1. I am using resized images as thumbnail links. I want the thumbnails to be 100px by 100px but I want the images to be resized so that their smaller dimension becomes the 100px edge and the other dimension gets cropped evenly from either end. For example, if the "src" image is 600px wide by 800px high, I want the thumbnail image to crop to 100px wide and 100px high in such a way that the original image would show up as though 100px had been removed from both top and bottom and then the whole thing was reduced in size by 600%. Here's an example of what I have so far for each image: &l
  2. I'll have to look into that. In the meantime, good news: I've gotten the other stuff up and running. I'd love to post a link but I'm not sure of the etiquette here...do people do that? My website is my online portfolio (I'm an artist) and it contains my CV, which in addition to my full name has my address and stuff.
  3. I want you to imagine my blank stare at that last piece of advice. Can you please explain what that means?
  4. Thanks again. 1. Filenames and extensions are exact matches. I'm a stupid novice when it comes to understanding and writing js and css, but some of those examples you gave are the kind of rookie mistakes I can safely say I don't make. Been using a computer for a while now.2. Currently I'm viewing the local file in Chrome while editing in Sublime Text. I'll upload to the web and see if it works there.3. Relevant ID references are as follow: [line 18] #intro {[line 42] document.getElementById("intro").style.backgroundImage = str;[line 242] <div class="intro"> Line 42 is copied, in its
  5. Thanks again! I really appreciate your help with all this. I'm still getting the same error message re line 42. Is it possible the "str" property style is erroneous, or something adjacent to it? I created the example with just three images on purpose, to make sure it works, but thanks for showing me how to automatically adjust to the number of images in the array. I would have probably had to ask how to place that anyway. The tutorial on the W3Schools site doesn't show how to nest the ".length" part into another function, or if it does, again...you know, I'm dumb. I'm also pretty c
  6. Thanks so much! But it didn't work: "Javascript Error: Uncaught TypeError: Cannot read property 'style' of null URL: Line Number: 42" I omitted the URL for privacy reasons. Line 42, in this case, is: document.getElementById("intro").style.backgroundImage = str;
  7. Thanks...maybe I'm undercaffeinated but I still can't figure out how to apply this. The W3Schools site is good for helping me get an understanding of the basics, when I'm thinking clearly, but I'm still not sure whether you're telling me I can't point any part of a script to files in a folder, or assign them index numbers that way. I want to know if I can I do something like this, and if not, what needs to change: <head> ... <script> var randimages = new Array("folder/image01.jpg" "folder/image02.jpg" "folder/image03.jpg"); document.getElementById("intro").innerHTML = r
  8. I'm trying to create a section on a page where it displays a random image from a given folder on page load. I also want this image section to be somewhat transparent, so that the text in front of it is readable. Very sorry if I bungle the terminology, I'm relatively new at this: 1. What code should I use, or how do I write the code, to automatically load a random image from a folder as a <div> section "background-image" on page load? I know how to do this for one specific image, but I don't know how to point to folder full of images and then have it select one at random each time the
  • Create New...