Jump to content

SamohtVII

Members
  • Content count

    55
  • Joined

  • Last visited

Community Reputation

1 Neutral

About SamohtVII

  • Rank
    Newbie
  1. SamohtVII

    How to start responsive design

    So I have been looking into making my website responsive and just have a few questions. 1) How many media queries will I need to write? I just want to cover phones and tablets and I don't want to get into too much detail besides that. Surely I can have a media query from the smallest device up until the largest phone and that will be it for phones. Same with iPads. Am I missing something here? 2) Can I put a media query anywhere? I want to changes some font size when it gets too small but the media query would be random like from 490px -550px. Is this ok to do? How do other people do it? Does anyone have some set widths they use or rules they follow? Thanks
  2. SamohtVII

    a tag entire height/width of parent div

    We have a winner! Thanks heaps everyone. Works perfect.
  3. SamohtVII

    a tag entire height/width of parent div

    The problem with that is some of the nodes have multiple words and some have just one word so I was hoping for something that can vertical and horizontal align so it's consistantly spaced.
  4. SamohtVII

    a tag entire height/width of parent div

    Thanks. That's very close but the text goes over 2 lines so now it is very spaced out. Any ideas?
  5. SamohtVII

    a tag entire height/width of parent div

    Here's a tricky one. I have a div (80x80) and inside the div is an anchor tag. I want the clickable area for the anchor tag to be the entire width and height of the parent div. Along with that I would like the text center aligned and center justified. The closest I have is display:block that aligns the text top and then I can get the text centered vertically but not horizontally. Can anyone help. I can't do any workarounds this must be done in CSS. Thanks <div class="subBubble"> <a class='node' href='node/89'>Imaging</a> </div> Thanks
  6. Hi all, I have a form that works fine inn all browsers except IE. The form needs to submit on enter and use ajax to handle the fom data, Here is the relevant code. Is there anything here I can do do make it work as is with IE. What makes IE not submit with Enter and how do I get around it. Thanks <div class="element"> <b>Address</b>: <form id="addressPForm"> <input type="text" id="addressForm" value="<?php echo $address; ?>"/> <input type="text" class="uidAddress" value="<?php echo $uid; ?>" style="display:none"/> <input type="submit" id="buttonXaddress"/> </form></div> $(function() { $("#buttonXaddress").click(function(e) { e.preventDefault(); var newName = $('input#addressForm').val(); var type = "address"; if(newName != '') { var id = $('input.uidAddress').val(); $.ajax({ type: "POST", url: "changeName.php", data: {newName: newName, id: id, type: type}, success: function(result){ document.getElementById("addressP").innerHTML = result; document.getElementById("addressP").style.display="inline"; document.getElementById("addressPForm").style.display="none"; } }); } });});
  7. I have developed a website and now we want to put that site behind the login of another website. So basically this second website has a login system and when logged in will redirect to mine. How can I hide my site from being found so you can't get to it without logging in through this other site. I am speaking with the developers of the other site to achieve this fyi. Thanks
  8. SamohtVII

    Format form in table

    Man if that works -.- brb RE: Nah doesn't work. I don't know why. Any reason why it wouldn't :S
  9. SamohtVII

    Format form in table

    Ok so basically I have a table with a form in it and regardless of how much people may hate tables and how porrly coded this may be I need to format the submit button inside the table but nothing seems to work. I have tried the usual like #confirmation #confirm {} table th #confirmation #confirm {} and every combination between that. Can anyone shed some like on how to style the submit button. Thanks <th><form id="confirmation" name="myFormAll" method="post" action="confirm.php"> <input type="number" id="amount" name="amount" style="width:100px;" required min="0" /></th><th> <input type="submit" value="Confirm" id="confirm" /></form></th>
  10. SamohtVII

    Disk Space for Business DB

    Hi, I have been asked to build a share management website and am now looking at web hosting and was wondering what the best option would be. I was looking at unlimited as this would be a sure thing in terms of avoiding and data problems, but I am completely ignorant in terms of how much space a database would use. The website itself is about 20 htm/php pages and nothing extreme by any means. Just a regular web page really. But the problem is there will be a lot of rows i the database. It keeps a history of everything and would eventually be quite big I imagine. Is 50GB a lot or should I just go for unlimited? Maybe that was all jiberish, sorry a bit noob with server renting and the like. Thanks
  11. SamohtVII

    Adding jQuery (URL or save)

    Is it faster or recommended?
  12. SamohtVII

    Adding jQuery (URL or save)

    So I have a script src to "http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js". Is there any difference between sourcing the url or saving it to my web space and accessing it from there? What is recommended? Thanks.
  13. SamohtVII

    mysqli query returning nothing

    So I just converted my mysql to mysqli and I noticed when I do something like this: $sql = $mysqli->query("SELECT * FROM `history` WHERE user = '$user'"); while($row = $sql->fetch_assoc()) { //DO SOMETHING } ?> If the query finds nothing it gets an error so now I am prefixing all my while statements with if($sql). If mysqli is so much better why does this error happen and is there a better way for me to avoid adding that extra if everytime. Thanks
  14. SamohtVII

    Multiple sql statements.

    Can you elaborate or link me to some more information about sanitizing output to avoid SQL Injection. Sorry not too experienced here. Thanks
  15. SamohtVII

    Multiple sql statements.

    Can someone tell me the best practice to use multiple sql statements. Right now I have a few statements I need run and it goes something like this: $sql = "UPDATE `details` SET balance=balance+$amount WHERE username = '$user'"; //Run sql statement $sql = "UPDATE `details` SET balanceAva=balance WHERE username = '$user'"; //Run sql statement etc. I have a feeling, and correct me if i'm wrong, but I can do this: $sql = "UPDATE `details` SET balance=balance+$amount WHERE username = '$user';UPDATE `details` SET balanceAva=balance WHERE username = '$user';"; And then run all that at once right? Thanks
×