8 replies [Last post]
Josh Connerty
Josh Connerty's picture
Offline
Enthusiast
Wiltshire, England
Last seen: 10 years 39 weeks ago
Wiltshire, England
Joined: 2008-10-17
Posts: 268
Points: 23

Hey guys, Thanks for reading.

I'm making this site structure to easily adapt using PHP to change things for certain pages and states.

Do you think this is easily controlled using css?

In other words I can make php do it but do you think it's easily made constant through out all of my pages.

The pages probably don't validate and it seriously isn't going to look like this but it will have the same structure.

Any thoughts would be great guys.

SITE: w3hut

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 10 years 5 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Lawlz, I don't get it. You

Lawlz, I don't get it. You must be doing something wrong with PHP-- each chunk it getting its own doctype, and the first doctype must need a chomp or something, it's making a space before it.
Is your question referring to your page having a header, menu, sidebar, main content and footer? Normally that works fine with PHP (or anything else).

Having a single CSS sheet with PHP adding HTML should also be fine-- I dunno what other people do but at our work I build the static HTML pages and thus the styles for them. My colleague stuffs them into a template (of either Perl or PHP) which then generates HTML (unfortunately mangling my gorgeous code in the process) and the CSS doesn't know the difference. The browser just looks at the HTML rendered, and looks at what the stylesheet says it should do with it, and it does. So, I build static versions of each page for testing the CSS, but once that's done and there's CSS for every possible HTML, it's good.

I'm no expert, but I fake one on teh Internets

Josh Connerty
Josh Connerty's picture
Offline
Enthusiast
Wiltshire, England
Last seen: 10 years 39 weeks ago
Wiltshire, England
Joined: 2008-10-17
Posts: 268
Points: 23

No I have only just started

No I have only just started it, It's dreamweaver that puts that in but I'll fix that soon.

By the way does that actualy effect it?

Thanks for getting back to me, All of the seperate parts are either set by two things databse arrays or includes so they should be displayed the same but I was just having reservations.

Josh Connerty
Josh Connerty's picture
Offline
Enthusiast
Wiltshire, England
Last seen: 10 years 39 weeks ago
Wiltshire, England
Joined: 2008-10-17
Posts: 268
Points: 23

Ok so I have had a play I

Ok so I have had a play I have two errors this is worrying because as far as I know I can't change this else I will loose my seperate page titles so this is for keeps.

First error is because I don't have a title in the head and the second is because I have the title in the body section, however even with these errors the title works fine.

Do you think these errors could efect the page?

Else I have an idea on how to change the title appropriately.

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

Josh are talking about

:? :mad: Josh are talking about the 'title' tag? if so that tag occurs once and once only in a page and only in one specifc area and that ain't the body! it belongs in the head of the document and is mandatory a page does not validate without it, search engines look for it, in fact your whole life is a misery without one.

@poes Shock you give your work over to scripters, that's terrible they should always be kept away from frontend work - the hub of development. I don't let any of our lot get their hands on markup unless they ask very nicely and then they know if they put one little ampersand wrong the extreme wrath of Hugo descends on the office as I STAB OUT & A M P ; Smile I cover all the frameworking I care little for the language none are that difficult to get to grips with, all the scripters are allowed to do is add script to the page , where it actually interacts with markup things are returned to my control; it's simply the only way of ensuring that markup remains valid, well structured and clean.

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

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 39 weeks 17 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Hugo is posilutely right.

Hugo is posilutely right. The template belongs to the html/css coder.

The mid-tier/backend coder write the code that assigns values to variables that are passed to the template. The guy writing the program need not care how the variables will be used. He may derive the values any way he wants, or change the method at any time without affecting the front end.

The template writer accepts the values and plugs them into his template. He need not care how they're derived, and he can modify the template in any way, at any time, without affecting the backend.

The two coders will need to talk, but the script and the template should see the other as a black box.

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.

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 10 years 5 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Hugo wrote:@poes Shocked you

Hugo wrote:

@poes Shocked you give your work over to scripters, that's terrible they should always be kept away from frontend work - the hub of development. I don't let any of our lot get their hands on markup unless they ask very nicely and then they know if they put one little ampersand wrong the extreme wrath of Hugo descends on the office as I STAB OUT & A M P ; Smiling I cover all the frameworking I care little for the language none are that difficult to get to grips with, all the scripters are allowed to do is add script to the page , where it actually interacts with markup things are returned to my control; it's simply the only way of ensuring that markup remains valid, well structured and clean.

LAWLZ! Yesh, they are used to my wrath but being men and I being a woman means they've already been able to tune their NAG AND B**** receivers so they don't hear me anymore (/me feels sorry for their wives as now they also cannot nag or b**** and get any result). But not being a backender (yet, wait til I learn Perl), I cannot work with a Stupidy-- er I mean "Smarty" template or the one our coder built himself in Perl (no clue why, 90% of all Perl you need is already written and sitting at CPAN) because I'm not a coder (nor do I even have access to their server!).
Front-End: HTML, CSS, Javascript, Flash/Actionscript.Java? They run on the client.
Back-End: PHP, Perl, Python, Ruby, ColdFusion. They run on the server.
Since the templates are collections of PHP or Perl code, I do not do them. I'm pretty limited. I only do HTML/CSS (hope to change).

See, you thought you had it bad because you have deadlines etc, well just watch, I write valid, semantic, accessible code and when it comes out of that template it may not even have a doctype, and someone will have added the ABOMINATION Unto Gawd known as AutoTab.js to my forms, and my carefully-written form-validation HTML (made to work with colourblind, actually-blind, the stupid and the grandmas) not even ever get uploaded in the first place. I just now had to explain why when FF-users click on a Flash banner sitting on our site, it doesn't take you to the other site with Firefox-- even though I had already explained that just because the 'tards at Adobe thought it was a great idea to add target="blank" to the Actionscript doesn't mean FF pop-up blockers won't just stop such crap (like they should). Instead of being a normal link it's become a pop-up. Completely dis-functional.

Everything I write is destroyed, mangled, raped, and pillaged. That is simply the way it is. My innerNazi sure doesn't like it, but I'm the only one who listens to it, and I put up with it because I'm allowed the time to learn how to do it Right in the first place, which I rather would have than your position where you don't have the time to find out how to do something more accessibly or experiment or spend hours on forums finding out how others got around an obscure user agent or whatever due to management-induced and marketing-invented deadlines-- the results may be the same, imperfect or not totally accessible content, but I think ours would be easier to fix. Problem is, it'll never, ever get fixed : (

I only have complete control over other sites I build (such as the one for our local fire dept where all the back-end is done by hubby, who is also fanatical about Good code not Oh It Works Okay code). When I learn Perl I guess I'll be able to take over and rule despotically over the whole of the sites, but until then (or until I become Dictator For Life of the World) I will have to live as I do.

Hmmm, Santa for Xmas I would like to become Dictator of the World plz.

I'm no expert, but I fake one on teh Internets

Josh Connerty
Josh Connerty's picture
Offline
Enthusiast
Wiltshire, England
Last seen: 10 years 39 weeks ago
Wiltshire, England
Joined: 2008-10-17
Posts: 268
Points: 23

@Hugo, Ok so I guess I'll

@Hugo,
Ok so I guess I'll work around it, I've put my trust in you Tongue.

Thanks for the ideas guys.

One more question could the page take a more coplex struture?

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

Josh you might need to show

Josh you might need to show the files that are responsible so that we can see what the problem might be, and how best to correct it.

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