Jump to content

Fmdpa

Members
  • Posts

    1,035
  • Joined

  • Last visited

Everything posted by Fmdpa

  1. One annoyance I have with JS is that everytime I start the browser, it blocks the JS in my page, and I have to click on the alert bar. I think this would be a problem with some users, so I would love to know if I can put something in my script to block the script blocker. Clear as mud?
  2. Fmdpa

    Background image

    Thanks! Heightening the body worked pefectly.
  3. Fmdpa

    Background image

    Thanks Deirdre's Dad. I never thought of expanding the height of the body element. I'll give it a try. Yes, margin:middle doesn't make much sense, but after nothing else logical worked to center the BG image (including your code in the other thread), I tried this and it worked!
  4. Fmdpa

    Background image

    I am making a page with a base background of black, then a backgruond image centered over that. Here is the code I have in the <head> section: <style type="text/css">body {background:black url('myimage.jpg') no-repeat top;margin:middle;}</style> It works perfectly EXCEPT for one thing. The image is about twice the length of the viewable page, so it should have a vertical scroll bar. But instead of that, it just cuts the image to FIT the page. How do I make the BG image so it isn't cropped? Thanks!
  5. I totally don't get the JS "search" function. http://www.w3schools.com/jsref/jsref_indexof.aspDoes it actually do more than return numbers like 1, 6, -1, etc.?
  6. Fmdpa

    Simple Question

    I'm understanding fairly well the concepts in CSS. I would still love to become fluent in it, but I just don't have time for that yet. Is there any reason programmers usually use hexadecimal color # for colors like black?One more thing: I tried the code you posted and it didn't really help too much. My problem is that the background image is longer than the page, so it needs to be scrolled down. Instead of that, the image is just cut to fit the page. I know how to align it to make different parts of the image display, but I want to be able to see the entire image without it being cropped. Any ideas?
  7. Fmdpa

    Simple Question

    I tried this, but it didn't work. I want a black background and the centered image over that. The code looks right, or at least close. Could you give me the exact code to put in my HTML file? For example: <body background: url("image.jpg") top middle no-repeat; background-color:black;>...</body ???I know when insterting JS into an HTML doc, you have to write <script type="text/JavaScript">. Do you have to do something like this with CSS?
  8. Fmdpa

    Simple Question

    Thanks! I really should undertake learning more CSS, but until then, this should work. I'll give it a try.
  9. I'm sure this is a simple question, but I just can't figure it out. I want to create a web page with a simple black background, which I do know how to do. But here's this problem. But over that black BG, I want to insert an ONE COPY of an image centered as the background of the actual web page, where everything will be located. So this image will cover something like 80-90% of the page width. When I do "<body background="*.jpg">..." it just repeats the image. When I insert it as <img src="*.jpg">... it treats it as an image (which it is), instead of a background and I can't place anything on top of it. I think a lot of my trouble is getting the image to align in the middle and not repeat itself. Thanks for your help!P.S. I am not interested in "convenient methods" that bypass the programming. My goal is to learn more HTML, JavaScript, etc.
  10. Fmdpa

    JS animation

    Thanks. That worked perfectly.
  11. Fmdpa

    JS animation

    I am attempting to create mouseover animations for a webpage using JS, but with little success. Here is the sample code I am trying to use: <html><head><script type="text/javascript">function mouseOver(){document.getElementById("b1").src ="b_blue.gif";}function mouseOut(){document.getElementById("b1").src ="b_pink.gif";}</script></head><body><a href="http://www.w3schools.com" target="_blank"><img border="0" alt="Visit W3Schools!" src="b_pink.gif" id="b1" width="26" height="26" onmouseover="mouseOver()" onmouseout="mouseOut()" /></a></body><!--second mouseover animation (or should-be-animation)--><head><script type="text/javascript">function mouseOver(){document.getElementById("b1").src ="b_blue.gif";}function mouseOut(){document.getElementById("b1").src ="b_pink.gif";}</script></head><body><a href="http://www.w3schools.com" target="_blank"><img border="0" alt="Visit W3Schools!" src="b_pink.gif" id="b1" width="26" height="26" onmouseover="mouseOver()" onmouseout="mouseOut()" /></a></body></html> My problem is that only one object is performing the animation. What code do I use to allow infinite numbers of animations on a page? Is there an alternative way to write mouseover animations?P.S. I do not care for "more convenient" methods, such as using a web design program. The main purpose of this is to learn web programming languages, and create a sample "webpage" (probably offline) demonstrating what I've learned.
×
×
  • Create New...