Jump to content

Mossman

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by Mossman

  1. well you already have height: 7px set for a few of them so just put in the width as well, that should sort it out.
  2. It looks like the images are repeating. If they are in a div or class, make the width and height of the div the same size as the image. Or put the code on here and some guru will solve it for you
  3. Yes but that is a little more tricky. I think you have to set the height of your body to 100% or it has no container to use as a measurement of what 100% is. There are guidelines on how to do it here: http://www.webmasterworld.com/forum83/200.htm
  4. #margin { margin: 18px; border: #000000 solid 1px; width: 100%; } That what you had in mind?
  5. Something like this for the style sheet: #leftcolumn { width:20%; } #textbox{ word-wrap: break-word; overflow: hidden; height: auto; border: #0099CC solid 1px; background-color: #FFFFFF; } #header { background-color:#009900; border: #0099CC solid 1px; } #footer { background-color:#009900; border: #0099CC solid 1px; } And the html like this: <body> <div id='leftcolumn'> <div id='header'> Header. </div> <div id='textbox'> This is a load of text. </p> Blah blah blah </div> <div id='footer'> Footer. </div> </div> </body> ...ought to solve it. The text box will change size automatically depending on how much you put in it as long as you don't specify a size eg height: 50px;
  6. Excellent, cheers guys. I'll give it a go.
  7. Hi, I need to produce a news feed on a website. I am going to create a table to store the individual news articles but I only want to show, say; the three most recent articles on the home page. Does anyone have any recommendations on how to go about it? I know it's probably quite a simple query for you guys but I'm a bit of a newb
  8. what do you mean by 'overflow'? Everything looks fine to me.
  9. yea that should do it mate - obviously with the image included in the div as well (background-image:).
  10. Yea, that should do the trick. Something like: <div id='image'> <div id='text'> blah blah blah </div> </div> ought to do it. It might not be the best solution but it works for me!
  11. I usually stick my images into div's on my CSS page. It means your html will be much neater too. I didn't understand if you were having problems with the image literally covering the text or just appearing below it on the page or something? I would insert my image like this: #banner { background-image:url(file:///C|/Documents and Settings/etc.jpg); width: 800px; height: 200px; margin-left: 5px; margin-top: 20px; border: 1px #000 solid; } Then you could just call the image with <div id='banner'> and move it's position with different margins. You can then write over it with your text as well by putting it inside the image div
  12. Ah that seems to have done the trick! Thank's for the help! I'd chopped and changed it so much I was totally lost. Thanks guys.
  13. Yes that's right. So the user can choose a company from a drop down list.
  14. it's looking like this: while ($row = mysql_fetch_assoc($result)) { echo "<form>"; echo "<select>"; echo "<option>" . $row['ar_name'] . "</option>"; echo "</select>"; echo "</form>"; }mysql_close($con); }
  15. Hi, I have been reading previous threads on dynamic lists. I just want to populate a list with a field from a table. The code I am using is: echo "<select name='selectcompany'>"; echo "<option value=$row[ar_name]>$row[ar_name]</a></option>"; echo "</select>"; It is taking each record and putting the results in their own seperate lists rather than all in the same drop down list. I know it's probably something simple I'm not doing but I've tried other peoples solutions and it's not working for me. I'd appreciate any suggestions!
  16. Your a legend mjdamato! I'm re-working the tables as you suggested and it's making life a lot easier. I was a little confused about the LEFT JOIN section of your query though? Thanks very much for the help!
  17. I am fairly new to php so I'm aware that I'm probably doing this in the most illogical way possible so I'd appreciate some alternative suggestions. I basically have two tables 'users' and 'celebrities', the user table contains a dream team of celebrities which the idea is they get points for based on their weekly exploits. I want to compare a users choices with the celebrity table to get the weekly points for that celebrity and store it in a variable which will then all be added together at the end to get a weekly total of points. I use this code and repeat it 11 times to get the points for each celebrity in the team: $query1 = sprintf("SELECT weekpoints FROM celebrities WHERE name = '" . $choice1 ."'"); $result1 = mysql_query($query1); if (!$result1) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $query1; die($message); } while ($row = mysql_fetch_assoc($result1)) { $value1 = $row ['weekpoints']; At the end I then update the relevant user record with this code: - $query12 = sprintf("SELECT * FROM users WHERE username='$username'", "UPDATE users SET weekpoints = '$update', totalpoints = '$newpoints' WHERE username = '" . $username ."' "); $result12 = mysql_query($query12); if (!$result12) { $message = 'Invalid query: ' . mysql_error() . "\n"; $message .= 'Whole query: ' . $query12; die($message); } while ($row = mysql_fetch_assoc($result12)) { echo $newpoints; echo "<br>"; echo $totalpoints; } As it stands i'm getting the wrong result at the end so something is going wrong, and the whole page is about 250 odd lines of code! I'm sure there is probably a better way about it! I'd appreciate any suggestions! (And please don't laugh )
×
×
  • 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.