14 replies [Last post]
jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

Hi I was wondering if any one can help me. I've hit a really annoying problem.
My XHTML validates as strict and my css also validates. However when you load the page in Firefox my left and right coloums show and also my top navigation and footer. However nothing else does until you refresh the page. It then comes up as it's meant to no problems, the refreshed url is the same that you first load up the page on.

My header doesn't show either but this is part of my template and works on every other page. I would post my code but as I'm not sure were the error is it would be a large amount of code, does any one have any ideas as I'm totally stumped as it work fines in IE 7 and IE 6 and as I say it validates. It is a PHP page, could it be an issue with my PHP code instead if it is sorry for the post.

The url is (Please excuss the crudeness)

http://www.bedtimebliss.co.uk/page/butt-plugs.php Mod edit/ NSFW

Excuss the unfunishedness IE6 is out at the mo and I'm working on it.

Any help will be much appreciated.

Cheers

James

War is for boys BDSM is for men

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 2 years 26 weeks ago
Bournemouth
Timezone: GMT+1
Joined: 2007-05-31
Posts: 693
Points: 45

Hope this isn't just a 'plug' for your site!

In the office so daren't venture in to the link for a gander Cool ...

However, just letting you know that I reckon there's a VERY large chance this is PHP related. That's what has always been the problem for me when something has simply not appeared initially, but has on refresh. But that's just my opinion, I could be wrong,

John

Have YOU said Hello yet?
The CSSCreator Hello Thread

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Please always mark links on

Please always mark links on subject matter that may cause offence or otherwise be embarrassing as NSFW (not safe for work)

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 2 years 26 weeks ago
Bournemouth
Timezone: GMT+1
Joined: 2007-05-31
Posts: 693
Points: 45

Good plan

I've never heard that before Hugo, but it's a blimming good idea. I guess I must have skipped over it in a sticky, but yeah, it would be so easy to blindly click a link like that and end up in trouble :-S.

If I had have clicked it and someone had have seen my screen, me and the product in the content of the link above would have had something horribly in common!!

Have YOU said Hello yet?
The CSSCreator Hello Thread

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 12 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Well it the thought of that

Well it the thought of that printout of browser history that passes by your managers desk monthly listing employees surfing habits Smile

Doreen : brides&bridesmaids.com / fluffy&sweet.com

John : butplugs.com

Not going to look too good Laughing out loud

Seriously though NSFW is convention and accepted acronym and on a public forum must be used.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

O sorry didn't think

O sorry didn't think
Yeah not a problem I appologise. Sorry John but cheers i'll check out my php code I thought it could be a css issue as it works fine in IE6 and IE7. If it was a php issue wouldn't it surly effect those browsers aswell though.
Cheers for the quick reply mate.

War is for boys BDSM is for men

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 2 years 26 weeks ago
Bournemouth
Timezone: GMT+1
Joined: 2007-05-31
Posts: 693
Points: 45

Put a plug in it!

Personally as a boss I'd be more inclined to worry about Doreen. Yes John is a pervert, but Doreen is likely to have spent MUCH more time on those sites then John did buying his new toy. But then again I'm an optimist, and doubt any boss would really forgive something like that just because the 'transaction was made quickly'.

Am I doing that selfish thing I do where I hop in and steal someone else's thread for my own selfish gain? I think I'm ranting again, and apologise to the OP. I'll leave this thread now (until tonight, when I can check out the link and see if your prices are competitive).

John

Have YOU said Hello yet?
The CSSCreator Hello Thread

burlster
burlster's picture
Offline
Leader
Bournemouth
Last seen: 2 years 26 weeks ago
Bournemouth
Timezone: GMT+1
Joined: 2007-05-31
Posts: 693
Points: 45

Jazajay

Jazajay: I see your point about the browsers, but you'd have something, even if it were unstyled if it was a CSS issue. PHP is the code that writes HTML so that's where the problem will probably lie if it's not being created properly.

In my opinion of course...

John

Have YOU said Hello yet?
The CSSCreator Hello Thread

jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

Hi yeah well i use a php/css

Hi yeah well i use a php/css script with a php browser detection script that uses if statements to display the code depending on which browser it is, and the code is tuned to the corrisponding browser and browser version. So all the browsers get slightly different css code. But the output is optimized without having to load up 3 seperate css sheets with hacks. This lets me easy delete styles as they are grouped when a browser is dropped.
I have one for each.

ie:
...browser detection script...
if ($browser == !ie)
{
Any browser than IE css;
}
if ($browser == ie && $version == 7)
{
IE7 css;
}
if ($browser == ie && $version == 6)
{
IE6 css;
}

Do you still think it is a PHP issue or could it now be a css. If it is a css any idea as to what it could be? AS i say css for FF validates.

Cheers and i'm competative trust me let me know if i'm not let me know and i'll alter my prices }:) .

No worries Cheers in advance.

War is for boys BDSM is for men

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 2 weeks 4 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

PHP!

syntax error

unexpected $end in /home/bedtim/public_html/inc/li.inc on line 122

there's your problem, fishbulb Wink

Verschwindende wrote:
  • CSS doesn't make pies

jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

HI you must have viewed it while i was testing my php

Hi
Sorry I was testing my php file at the same time it looks like. still cant find the PHP issue if it is a PHP issuse.

It seems like a PHP issue but all the varaibles are bieng passed over fine and all the variables are being accepted fine and i don't get any syntax errors check again i promise you wont. My codes now cleaner on my end, still no joy and havn't made any major changes. As I say it shows up in IE7 and IE6 that is what is making me think it is a possible CSS rather than PHP error. All my PHP is fine from what I can see.

The link to the page again is
http://www.bedtimebliss.co.uk/page/butt-plugs.php NSFW
(Not suitable for work)
Reload the page and it should appear. follow the view as a grid and it happens again it is the same page with different code but still you have to refresh it to see the page.

War is for boys BDSM is for men

jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

Hi found the issue

Hi
You gave me an idea, indirectly, and I checked out my PHP browser sniffer and found the problem it was in the FF CSS section of the sniffer which actully makes a lot sense - thanks man you are the greatest even if it was indirectly. lol Cheers again.

I would understand if the mods would like to delete this post as it turns out to be a PHP issue and not a CSS but cheers to everyone who helped me out.

War is for boys BDSM is for men

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 2 weeks 4 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Solved!

From the browser sniffer snippet you posted and the error we got, it looks like you had too many ENDs that didn't match up with your IFs.

Happens to the best of us Wink

I'll just mark this one as solved and move it to "Off Topic" Wink

Verschwindende wrote:
  • CSS doesn't make pies

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 11 hours 24 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9754
Points: 3836

Browser sniffing

@James: In general, browser sniffing is a poor practice. I cannot imagine that the same content/markup couldn't be sent to any UA. The css hacks, work-arounds and dumbing down that IE needs are generally well known, easy to apply and unobtrusive.

You're simply making more work for yourself and opening up new opportunities for error.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

jazajay
Offline
Regular
Leicester, England
Last seen: 12 years 34 weeks ago
Leicester, England
Timezone: GMT+1
Joined: 2007-07-26
Posts: 15
Points: 0

HI

Yeah but I find it a lot easier to work with as I noramly write the code in firefox then copy and paste it over to the other two and implement any "hacks" I need to the code that way. As in changes to IE code itself

One reason why I like the php/css script is it only delivers the right code to the right browser in one css sheet. Thus cutting down on the server having to either load up serveral sheets though comments or extra css though hacks. And as it's all in one place it's a lot easier to work with and pick out any mistakes.

I've worked with hacks and conditionl comments and hated js browser sniffers but when I learnt the php version I've just fallen in love to be honest but I can see your point. It's just I prefer the cleaner code it gives out and I've only experienced this one error and that was down to human error and I'm writting code a lot quicker.

But the main reason i like it is i can apply php if statements to my code though my css file thus allowing serveral options from my DB that hacks and conditional comments wouldn't allow me to do.

I've also read serveral comments, posts and the odd site that beleive in using hacks and conditional comments are bad practises as, and this was in the site I read from cant remember the url as i don't agree, but if you use hacks then you are not writting the code as clean as it can. Personally i don't agree using hacks comments etc... is fine I mean over 50% of the net doesn't even validate. I do make my pages validate both in css and XHTML strict which is good enough for me.

War is for boys BDSM is for men