Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

James Riley

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    James Riley got a reaction from afrotekno in floating footer   
    http://www.cssstickyfooter.com/
     
    I think this is basically what you want.
  2. Like
    James Riley got a reaction from woodsytime in Converting MySQL date to PHP format?   
    it was attempting to convert the string "2010-07-01 14:26:00" into an integer using php's Integer Casting, this results in 2010, in unix time this represents the time Thursday, January 1, 1970 12:33:30 am UTC (2010 seconds from the epoch)
  3. Like
    James Riley got a reaction from woodsytime in Converting MySQL date to PHP format?   
    date() takes a unix-timestamp as it's argument, not a SQL date string, what you need to do is convert it with strtotime()
     

    echo date('jS M',strtotime($mySQLdate));
  4. Like
    James Riley got a reaction from Eskymo in How to randomise a bunch of iamges with no repeat   
    <?php $files = scandir("path/to/directory/with/images/"); //loads the name of all files in a direct to an array shuffle($files); //randomly shuffle this array $num_img = 6; //we want to only print out 6 images foreach ($files as $key=>$file) { // loop over our randomised array of imagenames if (strpos($file,".jpg")!==false) { //check that they actualy have a .jpg extension, (we do this because scandir returns "."(current directory) and ".."(parent directory) also if($num_img--<0) { break; } // stop looping after we have 6 images. ?> <div class="imageholder"> <img src="path/to/directory/with/images/<?php print $file; ?>"> <!-- prints out a image tag for $file --> </div> <?php } } ?>
     
    That code will find all images within path/to/directory/with/images/ randomise them and print out a img tag for six random ones, customise the html as you need.
  5. Like
    James Riley got a reaction from Eskymo in How to randomise a bunch of iamges with no repeat   
    Include should work did you do it properly like
     

    include("featuredwork/$file");
  6. Like
    James Riley got a reaction from Jay Gilford in Completely stumped   
    I think you're overcomplicating things rather with your hashing here. But also you haven't really provided enough information to know what's going on here, how are you storing values in the database? how is the output you posted showing the mismatch generated etc?
     
    All i can think off the top of my head is something going on with extra spaces getting into your column somehow, or something like doing a hash of the binary value of the passwords hash rather than the string of the hash.
     
    Post more info though.
  7. Like
    James Riley got a reaction from crisp in CSS: Font and font size preference/ordering   
    The IE4 thing is pretty amazing, font-face started of as a proprietary Microsoft extension to CSS (like behaviour: and other stuff they tacked on to the standard) back when they were in there "we need more features to compete with netscape" phase. But they way they implement it is pretty different from the CSS3 standard and you've got to be pretty careful how you declare the rules otherwise IE will mangle them pretty badly, and also as before they've got their own .eot font-type which is basically not used anywhere else.
     
    But other than the pain of using it, it is pretty impressive they've had it for so long
  8. Like
    James Riley got a reaction from crisp in CSS: Font and font size preference/ordering   
    Relying on font-family to do fonts on the web is not really best practice. Especially fonts that have different metrics (thus require different sizings like the problem you're having) If you want fonts on your website and are limited to CSS2.1 really your options are either the "web safe" fonts or to use a font-replacement package like cufón. Neither ideal but that's the state of web fonts.
     
    In CSS3 the outlook is a little more cheery there's the new @font-face rule where you can define a font face and provide the font file so that you know the client will see your font. The only problem is support is actually pretty good; Firefox 3.1+, Safari 3.1+, Opera 10 and IE4+ the downside is that pretty much every browser supports different font types, IE requires .eot safari uses .otf and firefox uses its .woff font type. Additionally most commercial fonts you'll font will not allow embedding in this way (though this is a problem for cufon as well) so you're more stuck to free fonts and converting them about like a crazyman.
     
    Edit: Tools like http://www.fontsquirrel.com/fontface/generator help with @font-face converting
  9. Like
    James Riley got a reaction from jheg in quick style question hopefully   
    Hi jheg,
     
    This can be done using <span> and CSS.
     
    To do it inline:

    <span style="color:#ffffff">Tel. <span style="color:#00ff00">01394 123456</span> for mortgage enquiries</span>
     
    Although more correctly you would put all style information in to a CSS file and reference that in the HTML (PHP, ASP or whatever) document (e.g. index.php).
     
    In CSS file:
     

    .white-text { color: #ffffff; } .green-text { color: #00ff00; }
     
    In your web file:
     

    <span class="white-text">Tel. <span class="green-text">01394 123456</span> for mortgage enquiries</span>
     
    Hope this helps.
    Explosive Designs
     
    --
     
    Talk to us about professional, affordable web design - Explosive Designs
  10. Like
    James Riley got a reaction from mrchristoph in Cufon Problem   
    See "Special Cases" on http://wiki.github.com/sorccu/cufon/styling
     
    Cufon adds a .cufon-active class to the html element when cufon is enabled and active. This means you can style a element with and without cufon, for example:
     

    p { font-size: 10px; } .cufon-active p { font-size: 50px; }
     
    Or whatever you want.
     
    Hope this helps,
    Explosive Designs
     
    Web Design by Explosive Designs

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.