Page 1 of 1

do you know css

Posted: Fri Jul 20, 2007 11:31 am
by m2babaey
Hi
I don't know css.
Do you thinks that makes a big problem for me as a php programmer

Posted: Fri Jul 20, 2007 11:33 am
by Benjamin
Not if you have a designer ;)

Posted: Fri Jul 20, 2007 11:35 am
by m2babaey
but what if I go bidding in freelance services :(

Posted: Fri Jul 20, 2007 11:38 am
by guitarlvr
if you have someone to write your CSS for you then no it won't be a problem. If you plan on writting the visual presentation as well as the PHP code then yes it will become and issue if you don't know CSS.

Posted: Fri Jul 20, 2007 11:40 am
by m2babaey
can css be written by something like fronpage or so? or it must be coded manually like php?

Posted: Fri Jul 20, 2007 11:45 am
by guitarlvr
I've never really tried to get a WYSIWYG editor to write CSS. If it did, I immagine it would put it inside the page and not in a separate file (which is easier for administration). It might, all you can do is test it.

Posted: Fri Jul 20, 2007 12:10 pm
by m2babaey
cannot i move the internal code to an external style sheet?
also, how useful is that editor in css?

Posted: Fri Jul 20, 2007 12:27 pm
by nickvd
Frontpage is a useless editor for any language... in my opinion at least...

Posted: Fri Jul 20, 2007 4:03 pm
by Chalks
incidently, CSS is _very_ easy to learn. Just search google for "CSS tutorial", and you'll find plenty of resources.

Heck, I even taught my mother how to do some css so that I didn't have to keep changing her site... and she hates computers.

Posted: Sat Jul 21, 2007 9:46 am
by RobertGonzalez
If you plan on being a web developer that does more than server side coding then you will need to know most the newer levels of (X)HTML as well as CSS. Not knowing them makes you that much less of a valid choice for clients.

Frontpage is crap. Don't use it. Dreamweaver is also crap, but it does a decent job of writing CSS. I would recommend you learn CSS (the way you learned PHP), get a light editor (Notepad2 or Programmers Notepad) and starting making CSS rules for generic templates to see what it does (you know, kinda like the way you are supposed to try things in PHP to see what they do?).

Posted: Sat Jul 21, 2007 10:12 am
by superdezign
Chalks wrote:incidently, CSS is _very_ easy to learn. Just search google for "CSS tutorial", and you'll find plenty of resources.

Heck, I even taught my mother how to do some css so that I didn't have to keep changing her site... and she hates computers.
Not "easy." Just like PHP, you will likely run into a lot of problems due to a lack of understanding. There are concepts that are different, and a lot of things where the only way you'll really understand it is to actually DO it. foreach is a PHP thing, float is a CSS thing.

If anything, make sure that you learn and *understand* the box model. Margin, border, padding, content.

Posted: Sat Jul 21, 2007 10:43 am
by Chalks
superdezign wrote:Not "easy." Just like PHP, you will likely run into a lot of problems due to a lack of understanding. There are concepts that are different, and a lot of things where the only way you'll really understand it is to actually DO it. foreach is a PHP thing, float is a CSS thing.

If anything, make sure that you learn and *understand* the box model. Margin, border, padding, content.
I guess it depends on how you define "easy". I simply meant that compared to php, css is a breaze. You don't have to deal with functions, classes, objects, built in functions, predefined variables, etc. I could teach css to a brand new beginner _far_ easier than I could teach php... the concepts are simpler.


Edit: I suppose I may feel that way because I'm more familiar with css than php though. *shrug*

Posted: Sat Jul 21, 2007 10:49 am
by superdezign
Chalks wrote:I guess it depends on how you define "easy". I simply meant that compared to php, css is a breaze. You don't have to deal with functions, classes, objects, built in functions, predefined variables, etc. I could teach css to a brand new beginner _far_ easier than I could teach php... the concepts are simpler.


Edit: I suppose I may feel that way because I'm more familiar with css than php though. *shrug*
I guess also because as PHP programmers, we spend so much time on the back-end that we don't put that much effort into the CSS part. A lot of the more experienced programmers here still run into big CSS problems.

Posted: Sat Jul 21, 2007 12:11 pm
by RobertGonzalez
superdezign wrote:If anything, make sure that you learn and *understand* the box model. Margin, border, padding, content.
And how they differ among user agents. IE is the bane of many a developer's existence.

Posted: Sat Jul 21, 2007 5:40 pm
by Ollie Saunders
CSS syntax is easy but CSS based design is not. Truely.

I've read two books on CSS and have been using CSS based design and following blogs about it for almost 2 years and I still experience problems that require some creative thinking.

On one hand I'd say it's seriously worth learning because you can't really be left on your own to produce something without it but on the other it's a really big pain in the ass that you're better not being bothered with. For your CV's benefit you should probably do it. I recommend Bulletproof Web Design and the CSS Anthology and then there are a bunch of good sites: It's also well worth using simple PHP so you can compute CSS expressions and deliver slightly different CSS to different browsers.

Code: Select all

<?php
header('Content-Type: text/css');
$browser = get_browser(null, false);

$width = 600;
$leftWidth = 200;
$rightWifth = 205;
?>
body {
    <?php if ($browser->browser === 'IE'): ?>
    width:850px;
    <?php else: ?>
    min-width:500px;
    max-width:1150px;
    <?php endif; ?>
}
#main {
    width:<?php echo $width - $rightWidth - $leftWidth?>px;
}
#left {
    width:<?php echo $leftWidth ?>px;
}
#right {
    width:<?php echo $rightWidth?>px;
}
etc.