Jump to content

Perfect S.

Members
  • Posts

    10
  • Joined

  • Last visited

Perfect S.'s Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks, I got it working by adding the event registers into the .js file and it worked fine.Sorry about that, that was the only way I could find to do it on W3Schools.com... and it was my first script and I didn't know there was other ways to call a function.Whats site(s) do you guys recommend to learn more about Javascript?
  2. Aha! Got it working quite well. Thanks, all three of you (looked at/tried everything)!
  3. Perfect S.

    onresize

    Hi,I was trying to validate my xhtml strict document but it does not validate because I have onresize in the body tag like this: <body onload="Resize()" onresize="Resize()"> Does anyone know a way around this to get it to validate? I have no idea what to do... Thanks!
  4. Hi!I've been trying to create a centred, three column, fixed width design with a footer that will span all three columns but I cannot find any method that works for most browsers (I test on IE 6, IE 7 and Firefox).Basically I'm trying to get something like this that will work on the more popular web browsers:The footer is the problem because I can do most of the other stuff.I've searched and searched but most of the things I've come across don't work on IE 7/arent what I'm looking for. Does anyone here know of any resources / tutorials that would help me find one like this that will work on most browsers?I don't understand why divs are so hard to use if they're supposed to be the way things are done
  5. Perfect S.

    Divs

    Hi, I've made a web page (I used css and XHTML Strict) using divs and I was wondering if I could use Javascript to make the content div be the width of the screen - 145 pixels (that way I get a nice 10 pixel indent on the right side), if the screen size is greater than 800 pixels (so I have a minumum width).I've been searching around for the last 2 hours and haven't come across anything/anything that works.I've never done anything with javascript (this may be why I'm running into difficulties, lol), but I've done some programming before so I can usually understand a lot of it.I asked before about something similar to this and someone suggested using JavaScript HTML DOM Objects... but like I said, I have not been able to get anything working.Sooo... is this possible(and to make it work between FF and IE)? And does anyone have any good examples/tutorials if it is?THANKS!EDIT: I think I've figured out the problem. Are there any errors in this? It excludes FF a little because I found FF a little wonky. Wooo my first script. function Resize(){ var content = document.getElementById("content"); var header = document.getElementById("header"); var browser = navigator.appName; if (document.body.clientWidth < 780) { if (browser == "Microsoft Internet Explorer") { header.style.width = "780px"; } content.style.width = "635px"; } else { if (browser == "Microsoft Internet Explorer") { header.style.width = "100%"; } var width = document.body.clientWidth - 145; content.style.width = width + "px"; }}
  6. Sorry ahead of time if this is in the wrong forum; I wasn't quite sure if this was the right place.I was just wondering if you can use JavaScript to choose a certain stylesheet or adjust the size/placing of columns in a webpage depending on the resolution of the client's monitor or size of their web browser (either or). If not is it possible using something else? I'm trying to do a layout has either a small or large column and would rather not use a fluid layout.Thanks!
  7. Thanks for the suggestion, you're probably right.I changed it so that I now use <span> to format the images in the header and removed some other stuff and it worked fine for FF and IE after adding the line.Thanks!
  8. EDIT: Fixed, thanks!I am working on my school's website trying to make it follow all the rules of XHTML (I kind of forgot some important parts).Here's the website which is working fine the way it is.When I was fixing it on my local computer (not on the server) from: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <!--OOPS--> To <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> the images in the header displayed funny in IE 6 (on the left and right they are pushed in several pixels):The page displayed fine after I removed: <?xml version="1.0" encoding="UTF-8"?> Here's my css for the layout: div#header { position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; height: 200px; min-width: 780px; width: expression(document.body.clientWidth < 780? "780px": "100%"); background-image: url(../LayoutImages/BANNER-REPEAT.gif); background-repeat: repeat; z-index: 1;} div#content { position: absolute; left: 135px; top: 210px; margin: 0px; padding: 0px; min-width: 635px; width: expression(document.body.clientWidth < 780? "635px": document.body.clientWidth - 145 + "px"); z-index: 2;}div#navbar { position: absolute; left: 0px; top: 200px; width: 125px; z-index: 3;}img.right { margin: 0px; padding: 0px; display: inline; float: right; border: none;} img.left { margin: 0px; padding: 0px; display: inline; float: left; border: none;} img.navimage { margin: 0px; padding: 0px; border: none;}img.tvdsb { margin: 0px; padding: 0px; border: none; vertical-align: bottom;} Sorry, I'm new at this and am still learning. Does anyone know why the display of the images changes after I add in that line? As far as I can tell the javascript I put in the css for IE really has no effect on how the images display... it just makes a min width for IE. My school uses IE 6 only... so it's important that things work properly in IE 6.ANY help is greatly appreciated. Thank you.
  9. Perfect S.

    div vs Tables

    I made my school's website using divs. I thought it turned out all right considering it was my second ever website. I still need to fix a few things on it (if I ever figure it out) and in Firefox I have no idea how to make the content box span a certain width that would be able to change with a change in the browser width.
  10. Hi,I've been trying to find out if there is a way to place an unordered list inside the <li> of another unordered list and make it appear a certain number of pixels to the right that works in ie/firefox/whatever else.Like this (but without the white blotch and the second list being beside hey 3 which it is contained in):I'm trying to do this for a side bar that uses javascript that hides uls and then makes them visible (display: none; / display: block;) when you click on the element that contains it.Is what I'm trying to do possible? If not are there any other ways to do this that are simple enough? <ul> <li>Hey 1</li> <li>Hey 2</li> <li>Hey 3 <ul id="sub"> <li>Hellow 1</li> <li>Hellow 2</li> <li>Hellow 3</li> </ul> </li> <li>Hey 4</li> </ul> ul { list-style-type: none; width: 100px; border: 1px solid #000000; margin: 0px;}ul#sub { position: relative; left: 100px; list-style-type: none; display: block;} Any help would be greatly appreciated, thanks.
×
×
  • Create New...