Jump to content

IanS

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About IanS

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    London, UK
  • Interests
    Anything that's interesting, and even some things that are not interesting.
  1. That was it. Works now So folks are happy, and I'm off to buy some necessary books. Thanks (I remember that from when I first set up a phpbb forum ages ago and had a non-functioning site. If I'd understood the error I might have remembered it.)
  2. Back again with same task but moved on half a step.Trying to redirect to mobile page using php.I assumed the code here would redirect if the match was true, or continue to load the page (index.php) if not. <?php $agent = $_SERVER['HTTP_USER_AGENT']; if(preg_match('/iPhone|Android|Blackberry/i', $agent)){ header("Location: mobile.html"); exit; } ?>But is there some boolean weirdness? I'm getting this error - Warning: Cannot modify header information - headers already sent by (output started at /mysite/index.php:1) in /mysite/index.php on line 4in
  3. Turns out this code didn't work after all. Beats me why. I'll have to use javascript... (But then the viewport meta isn't working on iPhone either. Not having much luck with this mobile site all round!)
  4. Wonder how many other folks find themselves in this the same situation.Interested in learning, say, PHP, but needing to use it now because of things that crop up. Therefore often finding themselves in the situation needing to get quick help and advice from (very kind) people who know, and then implementing their suggestions on the fly before properly understanding how that works. Sure, you learn. In a random sort of way. But not an ideal way of going about it? Nevertheless, is this how most people end up coming at it? Or maybe just getting started? Interested to hear opinions/exp
  5. Right! Which is what you said... Done. Thanks!
  6. Hmm, that's where I put it, just under the doctype. Is there some reason why something simple like this would not work? -- <?php $agent = $_SERVER['HTTP_USER_AGENT']; if(preg_match('/iPhone|Android|Blackberry/i', $agent)){ header("Location: mobile.html"); exit; } ?> Bearing in mind I have no idea what I'm doing with PHP code! (There is a more complicated version of this, but even this cut-down one isn't working.) Could use JavaScript, but I'd prefer this to work. many thanks. btw, php does run on my server. I have foru
  7. Total php noob.Have a simple php useragent sniffer needed to redirect mobile users, etc...Where is best to place the script within the main HTML index file? Top of page? Before head, after it, in the body? Do bots read this script or ignore it?
  8. Thanks, that sounds like just the ticket :good:I presume if not Win32 then the normal image will load? Hopefully I'll get these colors figured before too long... cheers,ianS--- The link here is a bit out of date, btw.Macs now use 2.2 gamma. sRGB should be the same generally for all consumer devices these days. Though Microsoft seem to have invented wsRGB which only confuses the issue... The color in question here is 8cb272. On a Mac this is a pale sage but quite bright. On PCs it shows dark, unsaturated and dull. On the same image an orange has hardly changed and is quite acceptable. These co
  9. Wow, that was quick! Yes, I'm still trying to figure out why the graphics are showing different on Mac and PC screens. Technically there should only be minor differences, but I'm having a seriously different 'greens' issue! Not sure what the technicals are re platform and screens used, but generally all PCs I've checked on are not showing it as it should be. Work in progress there... Someone suggested a temporary quick fix of using javascript to find which platform folks are on and feeding a different image. I'm not expert or even very familiar with js so would need to know what the script sho
  10. There are doubtless examples of a script to determine which platform a user is on and load something accordingly - maybe someone could point me to the right place? This instance is due to unresolved problems getting color critical graphics to appear the same on Mac/PC (generally), and needing to get the page up urgently, I temporarily need to load different versions of the graphic depending... thanks,ianS PS. nice looking forum, btw. Will go check out invision...
  11. .GENIUS! Even works perfectly on IE7.No problem with the image moving out of view if scrollbar appears. It moves with the container div, exactly what I want. Perfect.Still haven't got my head round exactly how this works technically... I know you've explained it - still have some ways to go with CSS ground-level principals.I am in your debt... for whatever that's worth.Many thanks!cheers,Ian
  12. Thanks for this.Sorry, we seemed to have overlapped - I haven't tried your second suggestion yet, only just seen it.Will do later (Big day at hospital today so I'm a bit distracted!!).I'll be back....cheers,Ian
  13. I dont understand this.Page height? You mean the overflow?There is only text inside the div. Its the content text which scrolls. The div stays put. The background image in the div should stay put as well, just as it does if you use it in the body.Why is it working perfectly in FF when the background-attachment is not fixed?Try this code with an image but remove the 'fixed' line. You see... it works!But its a pain anyway. Different browsers doing different things, you could get old messing with this.There was Guy saying he made it work in Chrome. Didn't work here in FF or IE.But yes, I'm toying
  14. I was also dubious about using a fixed image in a div -- never done it before.Its only that this works fine in FF... so long as the .css doesn't say fixed!!It was only when I came to check on a Windows machine in IE that I realised something was afoot -- probably with my code.But its such a simple page... don't get it....Must say I'm deeply disappointed. Looks like I might have to dump the idea. Maybe fixed bgs are not meant for divs? I don't actually know
  15. Thanks Guy,I tried your code -- still doesn't show at all in FF.If I remove 'attachment:fixed' it came up but displaced down the page by 40px.So took all margins and padding away just to see. Still didn't work.Btw, I tried this without the top positioning, and still is the same.Also, I was wrong above. I tried changing the page doctype to non-strict and it still didn't work.Ian
×
×
  • Create New...