Jump to content

dsonesuk

Members
  • Posts

    11,220
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by dsonesuk

  1. dsonesuk

    date range

    Because, $monday= setdate, if this day is on Sunday, goes FORWARD 1 day, now you are in Monday, therefore 'this Monday' would target that Monday (next weeks Monday), whereas 'last Monday' brings you back the 'Monday' of the current week you are working to. Hope that makes sense! unless you mean? why not$startDate = $monday->modify("tomorrow");$startDate = $startDate->modify("last Monday");$startDate = $startDate->format('Ymd');$endDate = $sunday->modify("yesterday");$endDate = $endDate->modify("next Sunday");$endDate = $endDate->format('Ymd');instead$startDate = $monday->modify("tomorrow")->modify("last Monday")->format('Ymd');$endDate = $sunday->modify("yesterday")->modify("next Sunday")->format('Ymd');lot shorter
  2. It would probably be easier to just use a fullsize image for the background of the input button instead, but because it is a input button you will have to remove default borders, and adjust padding, margins that are being applied by your stylesheet to all input buttons, and do it in such a way that it will override this current styling. A id ref to input as in #contacts-form input, will take higher precedence over .link2 that targets styling already defined by #contacts-form input, to override you add the id ref as well #contacts-form input.link2. IF you still what to use this method, try this! this is only tested using firefox firebug to adjust id, class ref, apply other css styling to get what i think you are looking for. .link2_span { background: url("http://gatesinnovation.com/GATES/Images/link2-left.gif") no-repeat scroll left top transparent; display: block; float: left; width: 313px; cursor: pointer;}.link2_span span { background: url("http://gatesinnovation.com/GATES/Images/link2-right.gif") no-repeat scroll right top transparent; display: block; float: right;}#contacts-form input.link2 { border: medium none; display: inline-block; font-size: 15px; height: 37px; letter-spacing: -1px; line-height: 1.2em; margin: 0 7px; text-decoration: none; text-transform: uppercase; cursor: pointer;padding:0;}#contacts-form input.link2:hover, #contacts-form .link2_span:hover .link2 { color: #336633;}
  3. there is no span child elements for .link2, it is in fact the child element itself blue = parentred = children.link2 span {display:block;background:url(http://gatesinnovation.com/GATES/Images/link2-left.gif) no-repeat left top}.link2 span span {background:url(http://gatesinnovation.com/GATES/Images/link2-right.gif) no-repeat right top;padding:10px 22px} <span><span><input type="submit" id="submit-button" value="Envoyer" class="link2"></span></span> unlike .link4 .link4 span {display:block;background:url(http://gatesinnovation.com/GATES/Images/link4-left.gif) no-repeat left top}.link4 span span {background:url(http://gatesinnovation.com/GATES/Images/link4-right.gif) no-repeat right top;padding:10px 22px} <a onclick="document.getElementById('contacts-form').reset()" class="link4" href="#"><span><span><cufon class="cufon cufon-canvas" alt="Effacer" style="width: 48px; height: 15px;"><canvas width="56" height="18" style="width: 56px; height: 18px; top: -2px; left: -1px;"></canvas><cufontext>Effacer</cufontext></cufon></span></span></a> to get this to work you need to give the outer span a class name, then you can target both span.link2_span {display:block;background:url(http://gatesinnovation.com/GATES/Images/link2-left.gif) no-repeat left top}span.link2_span span {background:url(http://gatesinnovation.com/GATES/Images/link2-right.gif) no-repeat right top;padding:10px 22px} <span class="link2_span"><span><input type="submit" id="submit-button" value="Envoyer" class="link2"></span></span>
  4. dsonesuk

    Next step?

    Well i just counted your iq + your 1 brain cell that equals 3 doesn't it.
  5. dsonesuk

    appending id

    document.getElementById targets a unique id ref, so there would/should never be more than one, so using [n] to target another is pointless.
  6. dsonesuk

    Next step?

    Let me say it for you 1, 2, 3 AAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.
  7. What?, Where?, When? show the code
  8. <!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 Document</title><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script><script type="text/javascript">/*<![CDATA[*//*---->*/ $(document).ready(function() { $("#click_me").toggle(function(){ $("#show_hide").fadeIn(900);}, function(){ $("#show_hide").fadeOut(900); }); }); /*--*//*]]>*/</script> <style type="text/css">#show_hide{display:none;}</style></head><body><a href="javascript:void(0)" id="click_me">Click Me</a><div id="show_hide"> <p>Quis nostrud exercitation excepteur sint occaecat ut enim ad minim veniam. Consectetur adipisicing elit, qui officia deserunt ut labore et dolore magna aliqua. Eu fugiat nulla pariatur.</p> <p>Duis aute irure dolor sed do eiusmod tempor incididunt sunt in culpa. In reprehenderit in voluptate excepteur sint occaecat ullamco laboris nisi. Ut enim ad minim veniam, mollit anim id est laborum. Sed do eiusmod tempor incididunt velit esse cillum dolore. Ut labore et dolore magna aliqua.</p> <p>Ut aliquip ex ea commodo consequat. Eu fugiat nulla pariatur. Sed do eiusmod tempor incididunt in reprehenderit in voluptate consectetur adipisicing elit.</p> <p>Quis nostrud exercitation ut enim ad minim veniam, ut labore et dolore magna aliqua. Eu fugiat nulla pariatur. In reprehenderit in voluptate lorem ipsum dolor sit amet, mollit anim id est laborum. Duis aute irure dolor velit esse cillum dolore qui officia deserunt. Sed do eiusmod tempor incididunt.</p> <p>Duis aute irure dolor velit esse cillum dolore consectetur adipisicing elit. Ut labore et dolore magna aliqua. Qui officia deserunt sed do eiusmod tempor incididunt duis aute irure dolor. Velit esse cillum dolore in reprehenderit in voluptate eu fugiat nulla pariatur.</p> <p>Lorem ipsum dolor sit amet, ut enim ad minim veniam, excepteur sint occaecat. Duis aute irure dolor ut labore et dolore magna aliqua. Mollit anim id est laborum. Quis nostrud exercitation. Consectetur adipisicing elit, in reprehenderit in voluptate duis aute irure dolor.</p></div> </body></html> I can't see the problem, with display:none and $("#show_hide").fadeIn(900); it will or should start fade in instantly and fully show in 900 milliseconds, if you wish a delay before text starts fading in use delay() $("#show_hide").delay(3000).fadeIn(900);
  9. dsonesuk

    array suntax...

    for($i=0;$i<count($list);$i++)
  10. You are doing it the wrong way round, apply position: fixed; to a outer container, place the floated right div within this, place #testDiv within that and then use margin: 0 auto; to centre it.
  11. dsonesuk

    date range

    $newdate = '30-04-2012';//$newdate = '02-05-2012';$now = new DateTime($newdate);$week = $now->format('l') === 'Sunday' ? 'previous' : 'this';$monday = clone $now;$monday->modify('Monday ' . $week . ' week'); /*$now->format('j');$sunday1=clone $now;$sunday1->modify('+7 days'); not required here */$sunday = clone $now;$sunday->modify('Sunday ' . $week . ' week');for ($day = clone $monday; $day <= $sunday; $day->modify('+1 day')) {echo $day->format('Y-m-d').'<br />';}
  12. The only way i see of fixing this, where you will have exact distance from left of screen is to use a fixed width, that will accommodate largest amount of current characters 'answer', remove left/right padding and align center .myposttype { -moz-transform: scale(1) rotate(-90deg) translate(0px, 0px) skew(0deg, 0deg); background-color: #FFFFFF; border-top-left-radius: 20px; border-top-right-radius: 20px; font-family: "Courier New",Courier,monospace; font-size: 125%; font-weight: bold; left: -53px; /*amended by dsonesuk*/ padding: 5px 0 30px;/*amended by dsonesuk*/ position: absolute; text-align: center; /*added by dsonesuk*/ top: 20%; width: 83px; /*added by dsonesuk*/ z-index: -50;}
  13. dsonesuk

    date range

    That works as well, but i gather $sunday1 is to do with another part of code somewhere else?
  14. dsonesuk

    date range

    $now could be tuesday date, wednes.....etc therefore so will $monday, $sunday you have to define the actual monday and sunday values to get the range to loop through <?php$now = new DateTime;//$now->modify("+1 day");//$now->modify("+2 days");//$now->modify("+3 days");//$now->modify("+4 days");//$now->modify("+5 days");//$now->modify("+6 days");//$now->modify("+7 days"); $monday = clone $now;$monday->modify("+1 day")->modify("last Monday"); $sunday = clone $now;$sunday->modify("-1 day")->modify("next Sunday"); for ($day = clone $monday; $day <= $sunday; $day->modify('+1 day')) {echo $day->format('Y-m-d').'<br />';}?> the +1 and -1 days are used if on Monday, the last monday would the Monday week before, by going forward 1 day and selecting last Monday it becomes current last Monday, and then do reverse for Sunday.
  15. dsonesuk

    date range

    You don't need to loop through current weekdays, just identify if current day falls between start - end dates, and apply id to tr element <!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 Document</title><style type="text/css">.mytable td.weekdays {background-color:#FFFF99;}.mytable td.weekend {background-color: #FFCC99;}.mytable #current_week td.weekdays, .mytable #current_week td.weekend {background-color:#FF0033;}</style></head><body><?php$current = new DateTime;$monday = new DateTime;$sunday = new DateTime;$current = $current->format('Ymd'); // change from today to//$current = $current->modify("-1 week")->format('Ymd'); // last week$startDate = $monday->modify("tomorrow")->modify("last Monday")->format('Ymd');$endDate = $sunday->modify("yesterday")->modify("next Sunday")->format('Ymd');echo 'Monday = '.$startDate.'<br />';echo 'Sunday = '.$endDate.'<br />';echo 'current = '.$current.'<br />';?><table class="mytable"><tr><td class="weekdays">23</td><td class="weekdays">24</td><td class="weekdays">25</td><td class="weekdays">26</td><td class="weekdays">27</td><td class="weekend">28</td><td class="weekend">29</td></tr><?phpif($current >= $startDate && $current <= $endDate){echo '<tr id="current_week">';}else{echo '<tr>';}?><td class="weekdays">30</td><td class="weekdays">1</td><td class="weekdays">2</td><td class="weekdays">3</td><td class="weekdays">4</td><td class="weekend">5</td><td class="weekend">6</td></tr></table></body></html>
  16. Using position: absolute; is the problem, it should never, ever! be used for layout where float, margins, padding can be used instead. position: absolute; will position a element to a fixed distance from top, left edge (main problem), which is fine if every screen is a fixed size and resolution, but you are dealing with normal, wide screen, 800 to 1920+ resolutions, so what will look centred in 1024, will not in 1920px. It also is hidden from other element, so other elements can't know its height, width to move out its way, instead they will occupy the empty space it would have occupied.
  17. dsonesuk

    Next step?

    Well! good luck with that!. AS you have taken basically two years to learn simple BASIC php, mysql interaction using forms, and FAILED in understanding ANY OF IT, from w3schools, and this forum. Do you really think that you starting from scratch is really going help! come on who you kidding, just face it you just don't have the mind set to understand any of this to become a web developer/designer, as it goes in one ear and out the other. Just stick with what you can do, teaching English apparently. If there was a book 'php, mysql complete utter idiots' it would still be beyond you. JUST DO US A BIG FAVOUR AND GIVE IT UP.
  18. dsonesuk

    Next step?

    Both! of them.
  19. Well it looks the same to me?
  20. ?? What do you mean transfer/import 3d model? from 3d application like 'truespace', 'Swift3D', long time since i used these, but they just created a 3d model and you save it as a flash movie, might have changed since then, to use slider rotate etc.OR scan 3d model of plane for example, which sounds expensive, honestly don't know.
  21. Usually font without tails, (whatever you call them) as in Arial, Verdana, Helvetica compared to styles similar to Times New Roman for instance.
  22. What is the html code? you should have if context box width 600px; Note: you have to allow for left right padding and reduce image by these #img_content {width:600px; margin: 0 auto; background-color:#FF0099; text-align:center;}#img_content img {padding:10px 5px;max-width: 590px;max-height: 100%;} <div id="img_content"><img src="../dsonesosprey.jpg" /></div>
  23. You can make image any size you want as long as the image is square, then go to http://www.favicon.co.uk/ to shrink it down to a size usable as a favicon, but it will probably not turn out as wanted, because of minimising from 800 x 800 to 32 x 32, as you a trying to get a large image content into a minuet 32 x 32 pixel image comparison.
  24. It will always be a bit difficult to come up with a clear image at 16 x 16px or at 32 x 32 pixels.
  25. consider using px unit instead of %, the more/less text give different results.
×
×
  • Create New...