Jump to content

TJMAudio

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

TJMAudio's Achievements

Member

Member (2/5)

0

Reputation

  1. I am trying to learn how to do complete site designs with no tables, but am a complete beginner to CSS. I am having a problem with getting two divs to align on the same horizontal level, as you can see from this image: http://www.image-ant.org/files/c8098f952647b45e03e55eee71b7f762.jpg Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Website</title> <style type="text/css"> body, td, a, p { font-family: arial,sans-serif; } body { background: url(images/top_stretch_bg.gif) repeat-x; font-size: 13px; margin: 3px 8px 2em; } #logo { margin-left: 15px; margin-top: 0; width: 250px; } div#container { margin-left: auto; margin-right: auto; width: 90%; } div#toprss { width: 100%; text-align:right; } </style> </head> <body> <div id="container"> <div id="logo"> <a href="/index.html" title=".com Home"> <img src="images/logo.gif" title=".com" border="0" /></a> </div> <div id="toprss"> <a href="#subscribe" title="Subscribe to .com"> <img src="images/rss_top_right.gif" title="Subscribe to .com" border="0" /></a> </div> </div> </html> The RSS feed needs to be at a margin-top: 0; but it drops down, due to the logo div being there. How do I fix this?
  2. That is one of the main reasons I created this thread. All of my projects thus far have been solo, however when I look back at my biggest (and most technical), current project I often tell myself: "Man, if I decide to pick up another programmer on this, he is going to be digging through includes for 2 hours trying to figure out just what is going on in this mess!". I want to get away from that completely. I guess the biggest thing I could do is stop getting so excited over a new idea, sit back, collect the information I have, plan it out, and then start coding it. I rush into things, and write a whole new function because I realized I needed something in the last function, but completely forgot, and end up putting that new function in another file, because the first function gets called too early.. and it just became a mess. Thanks for the tips so far guys.
  3. So lately I have been trying to get into more OOP design and out of sloppy, repetitive coding. One thing that ends up making my projects a mess is that I get cluttered extremely quickly. I end up using require_once way too much, which results in me limiting myself to how open both my design and functionality is. How do you go about starting your projects off (do you write out your plans, draw a rough layout, etc.)? Do you use a database to hold your headers, meta tags, etc. and then pull them in a function? Any other tips on how to get OOP design without getting myself cluttered and in too deep would be appreciated!
  4. Is it possible to use the same variable names in the same script more than once, say whether it be inside a function or in the script itself, without overwriting data? First example: $query = mysql_query("SELECT * FROM table1"); while($row = mysql_fetch_array($query)) { $variable1 = $row['info']; } $query = mysql_query("SELECT * FROM table2"); while($row = mysql_fetch_array($query)) { $variable2 = $row['info']; } Would $variable1 and $variable2 contain their own data, or would $variable1 be rewrote when $query and $row are reused? Next example is reusing variables in multiple functions... function one($var) { $info = $var; } function two($var) { $info = $var; } Is that possible, or will function two overwrite function one, and vice versa?
  5. Alright, I have tried everything on this one. Now I need 4 random numbers that can't be the same. I just cannot seem to figure this out.
  6. I am trying to make a form validation, however my form uses heavy amounts of checkboxes and selects (upwards of 400 total). If a user currently does not fill the form in correctly, he has to go through and completely redo all of his work. How would you store a checkbox or select value in a form, and then set the checkbox/select to that by default if the session is set? The only way I could think of how to do it is run an if() for every single checkbox, checking if the session is set. Thanks
  7. Say I have an INT row that contains numbers 0 through 11. If the user does not define a number, I want it to pull from the row, no matter what it contains. Sorry if I am explaining this unclearly. Anyways, would I just do it like this: SELECT * FROM table WHERE $variable LIKE '%' Or is there some other way of doing it?
  8. I have a lot of variables that will either be 1 or 0. I want to loop through them, putting all that equal 1 into a list.. it would look something like this: <ul> <li>$var1</li> <li>$var2</li> </ul> And so on. Is there any way of doing this? All of the variables have different names, which is the problem I am having when coming up with this.
  9. I am trying to use the following code below, and am wondering if it is possible... <form action="index.php?pn=searchresults method="get"> Every time I click submit, however, it takes me straight to index.php without processing the form, just to the actual home page. So, is what I am trying to do impossible?
  10. Hey, I am still completely lost when it comes to this. So I would use a table, which would be set up with fields like so: | clickID (which would be auto_inc) | UserID (user who clicked it) | IP Address | AdLink | Date/Time | The thing I am confused about is how I would automatically credit their account for clicking and actually FILLING OUT the advertisement. I am scripting an online game and filling out ads (example, registering and bidding on an item on ebay), would give them extra starting money/items as a 'perk'. So, the problem I am coming across is how I would do this; the whole checking if they did it, then automatically crediting the UserID when it has processed. Normally I would come here for more exact help, but to be honest I have no idea where to even start, so even advice there would be great.
  11. My website is optimized to display at around 1050px width, give or take 50px. The problem is, it is currently stretching completely out, no matter the resolution. How would I make it so if it is 1050px, it will then center the site?
  12. I am trying to generate two random numbers, but have a check to make sure the first number isn't the same as the second. The numbers will range between 1 and 12. I have tried multiple ways of doing this, but cannot figure out an easy solution. Any ideas?
  13. Oh okay. I have been messing with this for hours and to no avail. Any ideas or suggestions on how to do this?
  14. Hello, I am having a problem with this Flash file loading before my website actually does. Is there any way to delay the loading of this Flash file, until my page is fully loaded? Would this be best achieved with PHP or with JavaScript? You can see it here: http://www.raidaholics.com/test/index.php?url=www.raidaholics.com The scripts can be seen with View Source, as they are copyright and I do not want to infringe them... Thanks!
  15. Is this even PHP? Or would it be JS? I can normally do pretty well figuring things out in terms of scripting, but this has me completely stumped.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.