wyc
wyc

Reputation: 55283

A client wants me to do CSS coding (only) but doesn't want to provide me the php files

I have a client who wants me to do CSS coding only, but doesn't want to give me the php files. Right now, I just have access to the live website (with no CSS). It is entirely made with tables and I want to use divs instead

I'm not sure if it is possible to do the coding I thought about copying and pasting the generated HTML code from each page Will this cause possible problems with the end result?

Upvotes: 0

Views: 122

Answers (5)

thirtydot
thirtydot

Reputation: 228192

If you absolutely can't convince them to give you access to the source, then this client sounds stupid:

  • He has a layout which is table based.
  • He wants you to magically make it look better with CSS, without having access to the source.
  • "@Phoenix I don't see any classes or IDs." - there are no classes or ids to hook into.
  • You might be able to do it if you used some CSS3 selectors to, for example, select the 3rd td inside a td inside the 2nd table to apply styles to ;)
  • But, that won't help if you have to support older browsers, which makes this impossible at the moment without doing something differently.

I don't have full knowledge of your situation, but here's what I would probably do (if I couldn't convince them to give me access to the source):

  • Open the live site.
  • Copy the HTML source code.
  • Paste it into a new local file.
  • Add this into the <head> section: <base href="http://the-clients-site.com/" />.
  • This will let all the assets on the page load from the client's actual site.

Now, you have something to work with.

  • You have to keep track of ALL changes you make to the file.
  • The first change should be adding your own blank style tag.
  • Then, you can add id and class to whichever elements you feel need it.
  • You should try to avoid moving around elements, unless it's absolutely required. Those changes are a whole lot harder to explain to someone. I know from experience.
  • You should be able to style the page properly now.

Then, you deliver the completed page, and the documented list of changes you had to make to the HTML (add id, here add class there).

The client should then be able to integrate the changes into his site.

Upvotes: 2

Moshe
Moshe

Reputation: 58097

I'm actually doing this right now for SO.

I'm working on a userscript that provides an alternate "clean" stylesheet for the StackExchange network. I have no access to the SO engine. I am using the Chrome Inspector to look at how the elements are set up. I recommend the same. (Although it is a little different, since I'm modifying the original CSS file.)

You can easily identify what you want to style with the Inspector and then work from there. I would suggest that you ask your client for a list of classes and IDs though. (I got that in the form of an existing stylesheet, you can go about it in a different way, if that suits you and your client.)

Upvotes: 0

Phoenix
Phoenix

Reputation: 4536

I don't see the problem. You can style tables just as easily as divs. You don't have to know how the wall is built to know how to paint it, which is pretty much all you've been hired to do. Only problem I could see would be if they haven't added any classes or ids to the elements yet. After all, what the browser/client sees is the only thing that needs styling, and since you can see everything that the browser sees, you can see everything that needs styling.

If they have added classes/ids, then just take a copy of a page and style it in a testing area, and then once it looks nice, you take a copy of another page and make sure it looks nice with it too, add to the CSS if there are any new unstyled elements that didn't exist on the first page, once it looks nice, then move on to another page, and another repeating the process until you are satisfied that it appears that every page within reason would look nice with it.

If they haven't added classes/ids, tell them they need to in some capacity before you can work on it, perhaps provide some guidance on the issue.

Upvotes: 0

Basic
Basic

Reputation: 26766

Well, at a bare minimum they'll need to modify ther PHP to reference your CSS. More importantly, you need to be able to hook your CS up to elements - Do tables/rows/etc. have Ids or classes attached?

If they are clever and have some good separation between code and presentation (using a templating engine or similar) then you can probably just edit the template / css.

If they won't let you edit the PHP and you come up with a new awesome layout, they will have a nightmare job trying to integrate it and probably won't bother.

Upvotes: 1

David Wolever
David Wolever

Reputation: 154544

Yes, this will cause huge problems: you'll do an awesome job, client will have trouble integrating it with their site, client will abandon your awesome work.

IMO, you should let the client know that you'll do the best you can with what they have given you, but you would be able to save them a lot of work and do a better job if you could have access to the source code.

If you know that you can't make the client happy with what they have given you, though, it would be doing everyone a disservice for you to try.

Upvotes: 3

Related Questions