Jump to content

cssfreakie

Staff Alumni
  • Posts

    1,674
  • Joined

  • Last visited

Everything posted by cssfreakie

  1. maybe instead of directly echoing the value, assign the value to a string with .= like: $string = 'monkeys '; $string .= 'eat '; $string .= 'banana\'s'; $string .= '.'; echo $string; // outputs monkeys eat banana's.
  2. pictures or i don't believe it you can mark it solved too if you find that a bit too much. (left bottom of the screen)
  3. as far as the validator: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sullens.net%2F~mthomas%2Fcins258%2Fproject%2Fcalendar.phtml%3F&charset=%28detect+automatically%29&doctype=Inline&group=0 you have 3 errors, i find that it explains very well what is missing, if you have a specific question about one of the 3 errors let us know.
  4. next time if you post code try out the bbcode code tags marked in the editor with a #sign a normal if statement would look like this: $name = 'john'; //setting a variable; if($name == 'john'){ // condition, is name equal to lower case 'john' notice we use == and not = echo "hello $name"; }else{// so incase the condition is not as expected echo "sorry you are not john"; } See the brackets, inside them you put the events that should happen ones a condition is or is not as expected. and again remove that @ sign it's an error suppressor and when developing we need errors in order to know what we do wrong.
  5. Not sure if this is the best metod, but it does the trick. functions to look for in the manual are strtotime() and date() $time = strtotime("now +12 hours"); $format = date("D M j G:i:s T Y", $time); echo $format; good luck!
  6. yes he means that != means 'is not equal too" it's the opposite of == which means "equal too" more info here: http://www.php.net/manual/en/language.operators.comparison.php so your statement actually says if the value of session[auth] is not equal to yes,... than say 'hello', while you want the complete opposite. Also the use of brackets can increase the readability of your script for yourself and others. assuming you work in a development environment remove the @ signs (error suppressors), and place the following above your script. <?php error_reporting(E_ALL); ini_set("display_errors", 1); ?> another thing, where does $firstName get it's value from?
  7. have a look here: http://www.javascriptkit.com/dhtmltutors/pagebreak.shtml keyword is page break. Also in case you were not aware, you can make a special stylesheet for printing purposes. hope this helps in a way.
  8. Glad it worked! as far as grid systems you might want to have a read here: http://www.tripwiremagazine.com/2009/06/45-css-grid-systems-layout-generators-and-tutorials-that-every-designer-should-know.html I prefer the 960-grid the yui-grid and stubbornella's grid (which i am not sure is in that article) As for a living, i sell snow to Eskimo's
  9. well, position relative is not needed to center something, besides that the margin:0 auto; trick works only for block elements. now lets look at your markup: <div class="clearfix" id="slider_wrapper">.....</div> so not only does it get it's style from the ID #slider_wrapper but also from class .clearfix and since it inherited from style.css line 389 a class of .clearfix with the property inline-block it won't behave any more as a block would. So the margin:0 auto; trick won't work. In other words give it a property of display:block; and all should be fine except for some extra margin you probably have to add to the top of that div. If you would have used a gridsystem, this could have been done much cleaner. (something to think about on your next project) Hope this helps!
  10. when writing the above comment i was thinking about your site pretty much the same idea
  11. tested and on second thought it might be useful to first make all characters lower case and than the first upper case so here is a working example. just edited it a bit and made it into a function <?php function supercaps($var){ $var = ucfirst(strtolower($var)); return $var; } echo supercaps('GORILAaAaaaaAAaaAaaaaAA'); // will output: Gorilaaaaaaaaaaaaaaaaaa ?> now any time you need a word where the first letter is only in caps use superscaps have fun!
  12. not tested but it could probably look like: <?php $_SESSION['first_name'] = 'john'; //bogus session var, remove this line ones tested if(isset($_SESSION['first_name'])){//make sure it's set echo $name = ucfirst($_SESSION['first_name']); } ?>
  13. try <label for="r1">fatmonkeys</label><input type="radio" name="group1" id="r1" value="1" />
  14. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=332149.0
  15. this is not a html question. moving to this to "Other Libraries and Frameworks". btw, show us what you tried, it might very well help, solve what you mean with "not working"
  16. if you use a clearfix at the bottom, overflow hidden is not needed. but than again, your using extra mark-up.
  17. sorry i don't see any problem of a div in a div apart from do you really need that. As already said an online example is always easier to debug stuff. (since you made your business of it, i bet you agree with that) the logic is exactly the same use an id or class and set properties to the inner elements, i already showed how to, the only thing is to adapt it to your code. If you have an online example i am happy to take a look, but as far as i can tell from your explanation this how to do it. in case you can only set a class or ide to the outer div, do like this div.classname div{ property:xxx; }
  18. well give the left and right div a background color and see if it shows up.... if it has a fix width but no height i bet it won't. I can also recommend firebug. I think i already did. just play with it. if you have no idea how to use it (firebug that is), you might want to have a look at a video at my blog. But as with most of things (except for pressing buttons in nuclear reactors ), just trying it out is often the way.
  19. have a look at this source. i quickly made a wrapper div, with a fixed width. inside that is a paragraph without an image and another with an image inside. maybe this is what you are looking for. this works out of the box. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link type="text/css" rel="stylesheet" href="css/style.css" /> <title></title> <style type="text/css"> .wrapper{ width:500px;overflow:hidden;background:#9f9f9f;padding:20px;position:relative;} .wrapper img{width:200px;float:left;padding:10px; } </style> </head> <body> <div class="wrapper"> <img src="http://kristinasa.files.wordpress.com/2010/08/patience.gif" alt="" /> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? </p> <hr /> <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro <img src="http://kristinasa.files.wordpress.com/2010/08/patience.gif" alt="" /> quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? </p> </div> </body> </html> live example here: http://cssfreakie.webege.com/phpfreaks/wraptext.php
  20. If you don't set a height but you did set a width and you want to shrinkwrap around the inner elements you can use overflow hidden on that specific container. did you try it?
  21. maybe before you ask, have a read. about overflow hidden. i wrote a short article on it, it should explain when overflow hidden can be used. the first logical reaction would be: "huh but doesn't overflow:hidden hide stuff..." after the article you should know if you should apply it or not. Than again, you can always test it in your browser with firebug (addon for firefox)
  22. ?? and your paying? indeed nothing if you want a quick answer put it online somewhere so we don't have to first download it and run it on our own servers.
  23. did you try whata i said allready? div.widget{ overflow:hidden; } also a nice thing to do is to give it a temporary background color, easier to see what is happening
  24. ah the "content" property. although it's considered wrong to use, it might be worth it indeed. nice for pointing that out chaseman. I might very well use it.
×
×
  • 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.