|
-
Feb 16th, 2001, 01:46 PM
#1
Thread Starter
Addicted Member
Hi,
I have recently just started learning HTML, I've been able to pick that up easly (well it's not really a difficult language is it), but wish to add some JAVA Script to my code to accomplish some (well 3) tasks as follow:
1. Change one/or more images when user places his her mouse on another image. I have done my site in Photoshop and will cut the images up and format my site layout using tables or so in my web page, I want some off the thumbnails I've done to act as link but I want them to change (go hot) when they are pointed at.
2. Hide scroll bars (both HScroll & VScroll) so that all off my page is visible. At the moment my site fits pretty well but the bottom slightly gets cut off due to the horizontal scrollbar.
3. Is it also possible for my site to start right near the boarder of a browser, at the moment there seems to be a margin.
I haven't done any JAVA Script so far so any descriptions of code would be appreciated.
!!! THANKS IN ADVANCE!!!
-
Feb 16th, 2001, 05:31 PM
#2
PowerPoster
to get rid of the margin add these attributes to the body tag
Code:
marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
The marginheight and marginwidth is for NS, the other two are for IE.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Feb 17th, 2001, 06:19 AM
#3
Thread Starter
Addicted Member
Thanks sail3005,
Do only those browsers support those attributes or is it an HTML specification standard, if it’s a standard from which version (i.e. HTML 2.0, 3.0 or 4.0)?
Any ideas any one on how I can do some rollovers (with JAVA Script) so that when user moves mouse over a linked thumbnail some other images on the same page change & then change back when user moves mouse off the link.
I have got a site source but because I’m new to Java Script needs some help with which parts off the codes need to be included.
The site I saw this feature is: http://www.designproject.com/
Check it out it’s really excellently designed, notice when you point to the small heading on the side the small icons change to Orange and if you point to the icon the appropriate heading gets highlighted.
This is what I want to achieve, any clues?
What about hiding scroll bars, both the Horizontal & Vertical.
!!! THANKS IN ADVANCE!!!
-
Feb 17th, 2001, 04:36 PM
#4
PowerPoster
try this:
Code:
<script>
var image1 = new Image();
var image1hover = new Image();
image1.src = "theimage.gif";
image1hover.src = "theimagehover.gif";
</script>
<A onmouseover="document.image1.src=image1hover.src" onmouseout ="document.image1.src=image1.src" href="#"><IMG src="theimage.gif" name="image1"> </a>
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Feb 19th, 2001, 04:15 AM
#5
Member
To following BODY tag code will remove the borders/margins from IE4+ and NS4+ :
Code:
<body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
As for the scrollbars - If you design your page so that it doesn't exceed the width of the browser window - you will not get the horizontal scrollbar, although if a different user has a lower resolution than you they are likely to get those scrollbars. I think it is relatively safe to design for an 800x600 resolution.
For the vertical scrollbar - I don't think you can remove that from the main browser, but you can achieve it by popping up a new window using Javascript (I won't go into that in this post).
Hope I helped.
-
Feb 19th, 2001, 08:39 AM
#6
Black Cat
The "correct" way to get rid of the margin is to use CSS:
Code:
body {margin: 0; padding:0; }
As none of those margin tags are official HTML. I'm not sure which browsers support this, though - it looks like IE3+, Netscape 4+, and Opera 3.5+ support it.
Also, I've noticed that , in IE5.5, even if the vertical scrollbar is not showing and the margin is set to 0, there is a gap of the right side where the scrollbar would be if it were showing.
Josh
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|