Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. At the bottom of what?1. If you want it right under the link:put this in the head of your document: <style type="text/css">.over span {display: none;}.over:hover span {display: inline;}</style> And put this wherever you like: <a href="anything.html" class="over">Some text<span><br />Some text</span></a> 2. If you want it at the bottom of the page:Put this in the head: <script type="text/javascript">function hideData() { while(document.getElementById("bottombox").childNodes.length > 0) { document.getElementById("bottombox").removeChild(do
  2. Maybe rather than using 0, false may be better:For example: window.menubar = falseAnd if that doesn't work try "no", but that doesn't really make much sense to me.
  3. <div style="position: absolute; bottom: 0px;"></div>or<div style="position: fixed; bottom: 0px;"></div>
  4. The toolbar can only be set before the window is opened.If you want to empty the window (I notice 'location=no') you can try:window.location.href = "about:blank";About other properties:window.personalbar = 0;window.statusbar = 0;window.menubar = 0;window.scrollbars = 0;There's no resizeable property for an existing window, but this script might be able to fix that:window.onresize = function() {return false;window.resizeTo(W,H); //W and H were defined in the script I showed you before}The window should maintain its history if you're not opening a new window.
  5. Just try this:W = 600;H = 400;window.resizeTo(W,H);
  6. You must put it into the for statement.A FOR statement has three parts:Initialization; condition; continuationYou initialize a variable, tell the condition in which to break the loop, and then tell it what to do on each iteration.
  7. No, that's not right.Let's try it in english:I have an array with 6 elements:0. Automotive1. Energy2. Entertainment3. Health care4. Education5. GovernmentNow, just for reference: i++ is the same as i = i + 1Let's start counting:i = 0. I can use i, or any other name, it's just to count.write "<ul>"As long as i is less than the amount of items in the list (i < listItems.length), do the following and keep counting (i++):write: "<li>" put item number (i) here (Example: if i is 2, write "Entertainment") "</li>"write "</ul>"
  8. I believe you can download software to run PHP on your computer. It doesn't run on its own though.
  9. The length property of an array object gives the amount of elements that the array contains:var G = ["Hello","testing","element"];document.write(G.length)//This will return 3var G = ["Hello","testing","element","something","something else"];document.write(G.length)//This will return 5To go through the elements of an array you need to do this:for (x=0;x<myArray.length;x++) {document.write(myArray[x])}
  10. Can you show the HTML that you're working with?
  11. Ingolme

    Width of div

    You can give it a fixed position, but it wil be fixed in comparison to the page, and it won't inherit values from its container. You'll have to give it its own width.I'm not sure exactly what you're trying to achieve, there may be other ways to work around it. Maybe you can post a diagram or something to show what you mean.
  12. CSS files don't contain HTML, you can apply the same style to all pages (colors, background images, borders), but it can't add elements into pages (tables, boxes, text).For that you can use the PHP require() function, or you can decide to use javascript and load navigation menu data from an XML file.
  13. The problem with your code is this:for(var items = listItems[0]; itmes < listItmes[5]; itmes++)The for command is an iterator: it only needs a number, not any other kind of data:.The program interprets this: The real solution does this:
  14. To solve your first problem you just need to change the CSS:.mid {background: url(skin/message/b_05.gif) top left no-repeat;padding-left: 28px;}About the second one. I really am not sure of a good method how to do it. It happens when you put <p> or <form> elements inside this kind of structure. One thing you can do it put a line break before and after the content:...<div class="content"><br /><!-- content goes here --></br /></div>...To give a fixed width or height to the box you can do this:<div class="all"><div class="topleft"><div cla
  15. Can you show the HTML code that you want the background applied to first?
  16. Ingolme


    Is session_start() written in accound.php twice?And another thing:It says "Welcome: 1" because you wrote $_SESSION['login']=1 in your other file.So in checklogin.php you do this:Where it says if($count == 1) you can put if($count==1) {$_SESSION['login']=$myusername;...
  17. Ingolme


    I've only used sessions for one of my projects before.But I think you're supposed to putsession_start();in your account.php file as well.
  18. That can be solved too... I just keep messing up.Change your HTML code so that it's like this (adding a new <div class="conten">: <div class="topleft"><div class="topright"><div class="topmid"><!-- Nothing here --></div></div></div><div class="left"><div class="right"><div class="mid"><div class="content"><!-- Begin content --><!-- End content --></div></div></div></div><div class="bottomleft"><div class="bottomright"><div class="bottommid"><!-- Nothing here -->&
  19. Maybe the UL width will take effect if you declare the document width first:html,body {width: 100%;}I have no guarantee it will work.Strangely enough, your ul tag seems to have a margin on both the left and right. I don't know why.
  20. That error means that the file (getcitiy.php) wasn't found on the server. Seeing as it was spelled wrong it's not a surprise the error was returned. It's called a 404 error, one between a list of errors that the servers have programmed to handle certain requests.
  21. Well, the action attribute of the <form> tag was misspelled. You can make the form submit when you select an option by doing this:<form action="getcity.php" method="get" id="myForm"><select name="country" onchange="document.getElementById('myForm').submit()"><option value="">select:</option><?php$result = mysql_query("SELECT DISTINCT country FROM cities");while ($row = mysql_fetch_assoc($result)){echo "<option value=\"{$row['country']}\">{$row['country']}</option>";}?></select></form>
  22. Well, you might want to submit the form first:<form action="getcitiy.php" method="get"><select name="country"> <option value="">select:</option> <?php $result = mysql_query("SELECT DISTINCT country FROM cities"); while ($row = mysql_fetch_assoc($result)) { echo "<option value=\"{$row['country']}\">{$row['country']}</option>"; } ?></select><input type="submit" value="Select" /></form>
  23. 1) I am not sure if I'm right, but I think that this is because the UL element, being a block, has the same width as the body, and when you move it 25%, the entire document is stretched by 25% (body's width + 25%).To solve it you can try giving the UL element a width of 75% to compensate the 25% you added to the left of it:ul#logo{ position:relative;top: 150px;left: 25%;width: 75%;padding-left: 20px;list-style: none;text-transform: uppercase;font-size: .9em;letter-spacing: .1em;}ul#mainmenu{ position:relative;top: 170px;left: 25%;width: 75%;padding-left: 20px;list-style: none;}2)This CSS:a:lin
  24. Oh, just change the part of code for .mid so that it's like this:.mid {background: url(skin/message/b_05.gif) center left no-repeat #FFFFFF;padding-left: 28px;}
  25. Ingolme

    Width of div

    If you want to "fix" the div's position and size relative to its container you can do this: <div style="position: relative; width: 70%;"><!-- container -->Some content<div style="position: absolute; bottom: 0px;"><!-- this div is set to always be on the bottom of its container, not of the full page -->Something else</div></div>
  • Create New...