Jump to content

midnite

Members
  • Content Count

    179
  • Joined

  • Last visited

Everything posted by midnite

  1. try changing from document.body.clientHeight to document.documentElement.clientHeight ?reference: http://www.fu2k.org/alex/css/frames/if it still can't, try expression((document.body.clientHeight/2>document.getElementById("outer").offsetHeight/2?document.body.clientHeight/2-document.getElementById("outer").offsetHeight/2:0)+"px");orexpression((document.documentElement.clientHeight/2>document.getElementById("outer").offsetHeight/2?document.documentElement.clientHeight/2-document.getElementById("outer").offsetHeight/2:0)+"px"); added +"px"
  2. haha~ thanks!Oops!! How come?? :)Anyway, don't you think the layout that like <table> centering is cool? Vertically center it if it can (that means shorter than the page height), and just display as if normal layout if it can't. No content will be going out of sight, and no extra spaces.The biggest headache is, the most popular browser is not following the W3C standard -__-try changing from document.body.clientHeight to document.documentElement.clientHeight ?
  3. oops!! Try removing the two [id] and test again? i have considered it wrongly...in IE 7, it will neither run those display: table; display: table-cell; nor the expression(...) for my script. So, removing the two [id] and if it works in IE 7, it means IE 7 support display: table; and display: table-cell; (aaa ? bbb : ccc) means if (aaa) {bbb} else {ccc} and / is just divide.
  4. In battlefield with IE standard for days, i finally end up with the following codes. Thanks everybody here, especially boen_robot who has helped me a lot! <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css">html, body { margin: 0; height: 100%; background-color: #0000FF; } /* bl
  5. just HTML is fine for image map =)
  6. i am working to it, but what i have to admit is that i really didn't write JS for a long time. So, here's my code. This does NOT work!! But i would like to post it, share, and for discussion. It will be great if it can give some tips to other programmers. <html><head><script>function decimal(e){ var text = document.getElementById("abc").value; var input; if(window.event) // IE input = e.keyCode; else if(e.which) // Netscape/Firefox/Opera input = e.which; input = String.fromCharCode(input);/*alert("input: "+input);alert("text: "+text);text="123";alert(text.search("."));*
  7. i use your code, add a space between IE and 7, delete overflow: hidden;, and test with my IE 6.0.The first number 1 didn't show at the topmost of the page. It goes out of the viewport. As there are totally 50 numbers, the 25 sits at the middle of the viewport. Because there is no overflow: hidden;, i can scroll down and find 50. But a large space (probably equals to the length of half of the content, ie from 1 to 25) is below the number 50.
  8. That's really cool to learn Conditional Comments!But simply say, IE cannot achieve the following layout without using <table>:1) if content is shorter than the viewport, place it vertically middle2) if content is longer than the viewport, let the topmost content stay at the top of the viewport. And the rest follows. And if we scroll downward, we can see the bottom content. And also not some extra spaces below the bottom of the content.Am i right? IE cannot achieve it or just i do not know how to make it?PS probably no overflow: hidden;. And <!--[if lte IE7]> should be <!--[if lt
  9. Thanks jlhaslip and boen_robot.As being told by many websites, using tables for layout has many drawbacks. So, if i can have the same effect, i would like to use <div> also. But in this case, unfortunately, i cannot make it.boen_robot, excuse me. What do you mean in fact? Could you provide some solutions? Thanks.
  10. for the link, you may just replace # with the URL you want, such as: <a href="#"><img src="button01.gif" /></a>becomes<a href="http://www.w3schools.com/"><img src="button01.gif" /></a> then when button01.gif is pressed, it will lead you to w3schools.For the centering, that's what also i am asking about. Kind of headache if we don't use <table>.But anyway, your case should be simpler. As you have a background picture and you would like to fix the buttons in a certain page of it. First, find out the offset (in px, pixels) that your buttons should place
  11. code for the second one: <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css">body, html {height: 100%;background-color: #0000FF;}#outer {height: 100%; overflow: hidden; position: relative;}#outer[id] {display: table; position: static;}#middle {position: absolute; top: 50%;} /* for
  12. Thanks very much for your replies.Of course i did gone through the w3schools tutorial and had searched the web before asking this. But it seems that people falls into two groups: who gives up having things vertically aligned center and who uses table.With static content (fixed length & height), it is not hard but still not ideal:http://jlhaslip.trap17.com/samples/misc/po...entereddiv.htmlwhen content is longer than the page, it keep vertically centered. Thus the top goes out of the page and can never been seen. (in both IE & FF)With dynamic content, it is quite complicated. Thus the ai
  13. after i have posted, i surf the web for this topic too. They all say similar things.i know.... but, indeed, what can i do if i want to place something center center? it seems to me that the only way is to use <table>
  14. 1. Why not use <table> for formatting? i feel good with it. What's the problem? What the point of others that they think table is not good for formatting?2. i can make some contents of variable length in the very center of a page by using table: <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><st
  15. you mean the line <?xml version="1.0" encoding="utf-8"?> ? i have include this at the top of the file.
  16. i am sure that my content is not longer than the height of the browser, because it consists of just a few words in a line.And i want my content to be placed in the vertical center of the page.If i skip <DOCTYPE>, i can use <table height="100%"> and <td valign="middle">. But it is not standard.i want to use XHTML 1.1 to achieve this: setting the content in vertical center.Is there a way? Thanks!!ReferenceStandard <DOCTYPE>: http://www.w3.org/QA/2002/04/valid-dtd-list.htmlValidator: http://validator.w3.org/
  17. For the problem i mentioned, i have somehow solved it by adding Option MultiViews. I did download the source code and wish to dig into it. But i think i wont have time to do so recently.i think there was a minor misunderstanding between us. i meant using Option MultiViews is a bit slower than not using it, said in the manual./etc/apache2/modules.d/00_default_settings.conf # The index.html.var file (a type-map) is used to deliver content-# negotiated documents. The MultiViews Options can be used for the# same purpose, but it is much slower. But anyway, dont bother. i used this powerful functi
  18. midnite

    PHP mailer

    are you looking for "\n" ?i am sorry that i don't really know what you mean
  19. alright, thanks so much for your reply, boen_robot.Here's some main lines of my configuration files:/etc/apache2/modules.d/00_default_settings.conf <IfModule dir_module> DirectoryIndex index.html index.html.var</IfModule> /etc/apache2/modules.d/00_mod_mime.conf DefaultType text/plain<IfModule mime_module>TypesConfig /etc/mime.typesAddType application/x-compress .ZAddType application/x-gzip .gz .tgzAddHandler type-map var</IfModule><IfModule mime_magic_module>MIMEMagicFile /etc/apache2/magic</IfModule> /etc/apache2/modules.d/00_languages.conf AddLangu
  20. Apache content negotiation works only in /var/www/localhost/htdocs and only for index.html.var???(i am meaning that turn Multiviews off, and use _solely_ content negotiation)i have tested index.html.var does not work outside.And even DirectoryIndex index.php.var does not work in /var/www/localhost/htdocs neither (It is very troublesome with so many restrictions, and only a static page!!)Is there a way to fix those?Or is it my fault for the mis-configuration? (i hope it is)Or the worst case, it is a limitation of Apache :)
  21. i guess, may be, the server that holds your page does not support PHP(?) So plain text is returned to users(?) Could you give more information about your problem so we can help more efficiently =)
  22. Hi,i am using Gentoo Linux and get Apache and PHP installed. i would like to give some spaces in my web server to others for holding there webpages. Yet granting them to use PHP may cause troublesome and i may bear security risk. So i would like to ban the use of PHP in their directories. i cannot take away PHP from my computer as my own pages require PHP. i did consider banning them to upload *.php through ftp. But i dont think this is a good solution as they may have some trick to "create" or "simulate" a PHP file. And also i guess there must be a way to restrict PHP support to some particul
  23. Thanks for your help and sharing your experience =)What if adding an index to the field last_login in the table Login_table? Doing such a MAX() and JOIN will be just working on indexes. Will it be better?i am not feeling good if i am keeping any unnecessary redundant data. And also it has the risk of data inconsistency (login time is not that important though, if in the case of a forum or blog likes yours, it will be strange and unacceptable for the inconsistency). Of course, if you have already get your blog's joining and sorting fields indexed and it also cause a dramatic decrease in perform
  24. i would like to show the time of a user last login upon that particular user login again. For example, if i logged in at 2/4 6:30. And when i login again next time, the system will remind me that "Last login: 2nd April, 2007 6:30p.m."i will keep a log for all the login and logout. So you can imagine that it will be a huge table!!And also, i will have a table holding members' information of course.Here comes my question,1) should i add a field "last_login" in the members' table,2) or querying the most recent date for a particular member's ID in the login logout log table for the last login info
  25. i dont think quarreling works in anyway. i would like to hear the solution instead. i believe all of us, especial datla, want your solutions rather than that
×
×
  • Create New...