3 replies [Last post]
anley
Offline
newbie
Last seen: 15 years 17 weeks ago
Joined: 2006-03-29
Posts: 4
Points: 0

Hiya, just found this forum which looks great because I'm learning CSS.

The styling part is simple, it's the positioning that's hard Shock

Got a really simple question about embedded and external sheets.

Am I right in thinking that 'generally' you want all your styling CSS code to be on an external style sheet.

But all the positioning of the layout of that page to be embedded?

Thanks

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

A simple CSS question

No where possible you want all of your styles as external linked/imported stylesheets, if you do have cause to require embedded styles these should just be minor styles unique to that page but you wouldn't want layout styling in there especially where it pertains to overall site layout that would just mean you kept repeating them on each page.

Try to keep away from using embedded styles unless your testing/ developing a page where it can be helpful until such time as you're ready to remove then to an external file.

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

anley
Offline
newbie
Last seen: 15 years 17 weeks ago
Joined: 2006-03-29
Posts: 4
Points: 0

A simple CSS question

Thanks a lot Hugs Laughing out loud

External it is. I see your point about repeating the code over and over, why bother.

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

A simple CSS question

It is one of the main points of stylesheets that they can set styles site wide from the one single file and that the file will be cached by the browser speeding up rendering of pages.


P.S I do hope you're a girl Wink Smile

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