Page 1 of 1

CSS

Posted: Wed Feb 15, 2012 8:11 pm
by AndrewD92
Do you think its bad to repeat the same CSS over and over again? I'm making a couple of mock-up dummy websites to add to my portfolio to show off my skills in web design. My uni lecturer said that my design eye is that of a professional and said that I need to make a portfolio so as potential interviewers can see what I can do. So for example, I set the width of the site container to 1000 pixels, but I then use the same width: 1000px in the header, navigation bar and footer.

Do you think its wrong to keep using this? I do it just for continuity sake.

Re: CSS

Posted: Wed Feb 15, 2012 8:32 pm
by EcazS
No. That's good, setting the width is sometimes better than only using floats.
E.g. if you set the width of the header to 1000px then the navigation won't end up on the side of the header but on a new "row" by itself, could be done with floats but I tend to use less floats.

Re: CSS

Posted: Fri Feb 17, 2012 4:54 pm
by jacek
If you are just setting one style to the same thing for a few elements I'd say it's fine.

If you were copying and pasting a huge section into lots of different blocks (to add the same gradient to them for example) I would say that would be wrong.