Jump to content


  • Posts

  • Joined

  • Last visited

jblack's Achievements


Newbie (1/7)



  1. The solution was to set the parent element containing the drop down menu to position: relative and then use left: 0 on the .dropMenu class. In the HTML above I denoted where everything was pushed down.
  2. Well, I fixed it through other means, cleaned up a lot of junk that was lying around from numerous failed attempts. In the end I changed to using <div> and <span> and cleared everything up.
  3. Essentially what's going on is I've created 2 drop down menus and the drop down menu with the most items pushes the content I want to put in the body of my table down. I've thrown various things at it and am yet to succeed in correcting this problem. I've read around and, though I may be totally off, what I understand is that the z-index of the parent element is affecting this. I am at a loss as of now and have finally come to ask the question. Here's what I've got for you: <style> body { background-color: #000000; color: #8c8c8c; margin: 0; } table.main { background-color: #0a0a0a; border: 0px; padding: 0px; width: 960px; height: 100%; border-spacing: 0px; } td.banner { height: 175px; } td.navbg { background-image: url("images/ccNavBG.gif"); height: 32px; } table.nav { border: 0px; padding: 0px; border-spacing: 0px; margin-left: auto; margin-right: auto; position: relative; } .dropMenu { background-color: #0a0a0a; width: 98px; visibility: hidden; z-index: 5; color: 8c8c8c; border-left: 1px solid #141414; border-right: 1px solid #141414; border-bottom: 1px solid #141414; display: block; position: absolute; } a { text-decoration: none; } table.adminBar { position: fixed; z-index: 3; right: -128px; width: 160px; height: 192px; padding: 0px; border-spacing: 0px; top: 25% } td.adminBarBG { width: 32px; background-image: url("http://crimsoncourt.hollosite.com/design2/images/adminBarBG.gif"); background-repeat: repeat-y; } td.adminNav { background-color: #0a0a0a; width: 128px; } span.adminHead { text-align: center; width: 128px; padding: 0px; font-size: 110%; } ul.adminFunc { list-style-type: none; padding: 0px; } table.content { padding: 0px; width: 900px; } span.contentHeader { margin-left: 32px; width: 300px; font-size: xx-large; } table.container { border: 1px solid #8c8c8c; border-radius: 10px; position: relative; z-index: 1; } td.news { width: 350px; padding: 32px; height: 200px; } td.poll { width: 200px; padding: 32px; } span.tags { font-size: x-small; } </style> And the HTML: <table class="main" align="center"> <tr> <td class="banner"><img src="images/ccBanner.gif"/></td> </tr> <tr> <td class="navbg" align="center"> <table class="nav"> <tr> <td><a href="index.php"><img src="images/navHome.gif" /></a></td> <td onmouseover="menuShow(1)" onmouseout="menuHide(1)" style="position: relative;"><a href="clan.php"><img src="images/navClan.gif" /></a> <table class="dropMenu" id="1"> <tr> <td><a href="clan.php?action=about">About</a></td> </tr> <tr> <td><a href="clan.php?action=members">Members</a></td> </tr> <tr> <td><a href="clan.php?action=mypage">My Page</a></td> </tr> <tr> <td><a href="clan.php?action=myfiles">My Files</a></td> </tr> <tr> <td><a href="clan.php?action=rules">Rules</a></td> </tr> </table> </td> <td onmouseover="menuShow(2)" onmouseout="menuHide(2)" style="position: relative;"><a href="events.php?action=current"><img src="images/navEvents.gif" /></a> <table class="dropMenu" id="2"> <tr> <td>- <a href="events.php?action=new">New</a></td> </tr> <tr> <td>- <a href="events.php?action=current">Current</a></td> </tr> <tr> <td>- <a href="events.php?action=auction">Auctions</a></td> </tr> </table> </td> <td><a href="chat.php"><img src="images/navChat.gif" /></a></td> <td><a href="forums/"><img src="images/navForums.gif" /></a></td> <td><a href="games.php"><img src="images/navGames.gif" /></a></td> <td><a href="contact.php"><img src="images/navContact.gif" /></a></td> <td><a href="gallery.php"><img src="images/navGallery.gif" /></a></td> </tr> </table> </td> </tr> <tr><td> here is where all the content is pushed down <table class="content" align="center"> <tr> <td><span class="contentHeader">News</span></td> </tr> <tr> <td> <table class="container"> <tr> <td class="news"> <b>Update: Site Status</b><br /> <span class="tags">Posted 11/14/2013</span><br /><br /> Content going in here </td> <td class="poll"> stuff going in here </td> <td class="news"> stuff going in here </td> </tr> </td> </table> </table> </td></tr> </table>
  4. *Edit -- After working at it I figured my problem out. I made a terrible mistake.
  5. Alright thanks. Script is working well now. Here's the final script, just have to add my large list of words now. <?php// my list got them into alphabetical order$list = "helpthisscriptmightelwoodatherus";// test scrambled words, got it into alphabetical order, explode as well$scrambled = $_GET['scrambled'];$scrambled = explode("\n", $scrambled);$number2 = count($scrambled);// explode list, count and sort$list = explode("\n","$list");$number = count($list);sort($list);// trim list, not really working I don't think.$i = 0;while($i < $number) {$list[$i] = trim($list[$i]);$i++;}// trim $scrambled$i2 = 0;while($i2 < $number2) {$scrambled[$i2] = trim($scrambled[$i2]);$i2++;}// echo my sorted list to check values$i=0;while ($i < $number) {echo "$list[$i]<p />";echo "$scrambled[$i]<p />";$i++;}// split $list into individual characters and sort them -- got rid of empty space problem// thanks to JamesB.$i = 0;while ($i < $number) {$str[$i] = preg_split('//',$list[$i],-1,PREG_SPLIT_NO_EMPTY);sort($str[$i]);$i++;}// Do the same thing with scrambled list$i2 = 0;while ($i2 < $number2) {$scrambled_char[$i2] = preg_split('//',$scrambled[$i2],-1,PREG_SPLIT_NO_EMPTY);sort($scrambled_char[$i2]);$i2++;}// print my alphabetical arrays, scrambled an unscrambled.print_r($scrambled_char);echo "<p />";print_r($str);echo "<p /><p />";// implode my alphabetical arrays and print the results.$i = 0;while ($i < $number) {$alphalist[$i] = implode($str[$i]);echo "<p />";$i++;}echo "<p /><p /><p />";print_r($alphalist);$i2 = 0;while ($i2 < $number2) {$alphascrambled[$i2] = implode($scrambled_char[$i2]);echo "<p />";$i2++;}print_r($alphascrambled);// Check for matches$i = 0;while($i < $number) {$i2 = 0;while($i2 < $number2) {similar_text($alphalist[$i],$alphascrambled[$i2], $percent);if($percent == '100') {$unscrambled[$i2] = $list[$i];}$i2++;}$i++;}print_r($unscrambled);?>
  6. $string = "123456";$string = explode('//', $string); that would make $string[0] = 1... etc. However just to access the characters you wouldn't need to convert it into an array.You could just use $string[3] without exploding and that would be 4.
  7. Alright here's my updated script (some words changed for unrelated reasons). It's still kind of messy. I also echo quit a bit to make sure I'm getting the general results that I want. output at www.twdesignjb.com/test.php <?php$list = "helpthisscriptmightelwoodatherus";$i = 0;$list = explode("\n","$list");$number = count($list);sort($list);while($i < $number) {$list[$i] = trim($list[$i]);$i++;}$i=0;while ($i < $number) {echo "$list[$i]<p />";$i++;}$i = 0;while ($i < $number) {$str[$i] = preg_split('//',$list[$i]);sort($str[$i]);$i++;} print_r($str);echo "<p /><p />";$i = 0;while($i < $number) {$a = $i;$count[$i] = count($str[$i]);$i++;}$i = 0;$a = 0;while ($i < $number) {foreach($str[$i] as $alpha) {$alphat = $alphat . $alpha;echo $alpha;}echo "<p />";$i++;} echo "<p /><p /><p />";print_r($alphat);?>
  8. Well, I tried trimming each word in the $list array but when I go to split up the characters I still get [0]'s and [1]'s as empty values. I'm also having troubles getting the alphabetical strings back into a 1 dimensional array, where as $alpha[0] = adfs and $alpha[1] = aehrstu.
  9. Alright I'll work on that, that might help me a lot, I'll come back later and report my results.
  10. What I'm wanting to do, though, is after I get the characters sorted I want to be able to echo them so I would getadfsaehrstuedloow...And if I get an anagram of atherus such as ahreust I can sort it into aehrstu and compare it to the presorted list and reverse it to find atherus. Honestly I'm making an anagram solver with a set list of words to compare to. I got it to sort the characters into a multidimensional array alphabetically now, but the issue is that $str[0][0] and $str[0][1] both are '', then $str[0][2] = a. And the rest is in alphabetical order. The issue is that on the second dimension the strings start at [2] rather than [0]
  11. well, lets use "atherus" and "asdf" as an example. after I split $list into it's separate parts I sorted that into alphabetical order, therefore $list[0] = asdf and $list[1] = atherus. Then I want to split those elements of $list into characters and alphabetize them so I get $str[1][0] = a and $str[1][1] = e and so on for the other parts of $list. Or something to that effect so that I can compare a larger list to a few words that are scrambled. This is just the beginning of the prototype to get things working.
  12. @justsomeguy I am aware that you can access a character in a string like that, but thank you anyway. I use the regular expression because I can't seem to get str_split work. Can you alphabetize a string without splitting up the characters though?
  13. Well I've already got the list sorted and that works, I just can't seem to get str_split or preg_split to work, or they work and I can't get the letters to sort. I'm not entirely sure if preg_split is working, but str_split wasn't working for me at all.
  14. Well I know it's not pretty, but the basic problem here is that after I get the words sorted in $list in alphabetical order I am unable to split the resulting strings into individual characters and then alphabetize them. I'm looking to get something that looks like this: $str[0] { [0] => a [1] => d ... [3] =>s}$str[1] { [0] => a [1] => e ... [6] =>u} and so on. I'm just doing this for no specific reason other than to give myself something to do. Any help would be greatly appreciated. My script is below. (wee bit messy) <?php$list = "asdfmaybescriptmightelwoodatherus";$i = 0;$list = explode("\n","$list");$number = count($list);sort($list);while ($i <= $number) {echo "$list[$i]<p />";$i++;}$i = 0;while ($i <= $number) {$str[$i] = preg_split('//', $list[$i]);$i++;}$i = 0;while($i <= $number) {$a = $i;$count[$i] = count($str);$i++;}$i = 0;while ($i <= $count[$i]) {echo $count[$i];$a = 1 + $i;sort($str[$i]);echo "$str[$i][$a]<p />";$i++;}echo "$str[3][3]";?>
  15. There isn't anything in the database.Edit - Here's line 202$user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' );
  • Create New...