Ask a Question related to Macromedia Dreamweaver, Design and Development.
-
Alexander Ross #1
2 css questions
1) I have a .css file for a site I'm working on and it keeps growing and
growing and its getting harder and harder to find things and stay organized.
Other than seperating things out into 2 .css files, are there any strategies
for organizing and keeping straight these big css files?
2) This question is counter-intuitive by its very nature, but humor me for a
second... Can you use variables in a .css file. Here is why I'd want to: On
my site I use (primarily) 3 different colors. These appear as td background
colors, as text colors and link colors, as colors for H tags, etc... Lots of
places! Wouldn't it be nice if at the top of my css file I could have :
var color1: #FFFFFF
var color2: #990000
var color3: #CCCCCC
Then later in my sheet I can just set things to "color1". This way if I want
to change my color scheme, its EASY.
Thanks
--
Alexander Ross
[email]alexross@bleen.net[/email]
Alexander Ross Guest
-
AMD-64 Questions
Hi All: Newbie w/ some questions: PC: AMD-64 bit, full install working reasonably well (no attempts at multi-media yet): w/ Athlon AMD-64... -
Mac OS-10 & MX questions / Please Help!
A couple of questions: 1. I am getting a Mac with OS10 running Director MX. If I create a projector, will it run on older OS systems? 2. Which... -
2 questions
For an example of how to use the SysCmd, open the Northwind sample database, and look in the Utility module. They have a wrapper function named... -
The questions.
"Chris Thomas" <chrisvai777@hotmail.com> wrote in message news:9f682ea7.0307210257.5a2a89a1@posting.google.com... It depends on what drives you... -
2 questions :) - portal questions
Say the portal displays a relationship that uses the Box_ID field as the match field on both sides. In the child file (items in the box), add two... -
darrel #2
Re: 2 css questions
> are there any strategies
1) Don't have DW write your CSS for you (that can get messy).> for organizing and keeping straight these big css files?
2) Understand how CSS cascades. You probably have a lot of redundant classes
and styles in your style sheet.
a> 2) This question is counter-intuitive by its very nature, but humor me forYes...to an extent. I believe this is a CSS3 feature, which, I don't think,> second... Can you use variables in a .css file.
any browsers fully support, though I think Moz can handle a few things.
Wouldn't it be nice if at the top of my css file I could have :
want> var color1: #FFFFFF
> var color2: #990000
> var color3: #CCCCCC
>
> Then later in my sheet I can just set things to "color1". This way if IOh...THAT kind of variable. Hmm...interesting idea, though, again, with the> to change my color scheme, its EASY.
cascade, it's not that hard to spec those colors once and just change that
one color.
-Darrel
darrel Guest
-
P@tty *TWB* #3
Re: 2 css questions
If you have (or can get) TopStyle, its "Style Sweeper" is great for>... are there any strategies
> for organizing and keeping straight these big css files?
neatening up style sheets. It automatically groups all the selectors by
type, and then alphabetically, and formats the rules all nice and neat.
Might be a start, at least! :-)
a> 2) This question is counter-intuitive by its very nature, but humor me forTo the best of my knowledge, you can't use variables in an *external* style> second... Can you use variables in a .css file.
sheet, but you can definitely use them in a document style sheet
(<style></style>) within an HTML (or XHTML) page.
Hope that might help.
--
P@tty Ayers
[url]http://www.WebDevBiz.com[/url]
Professional Web Business Tools:
Web Design Contract, Estimate Worksheet, and more
--
P@tty *TWB* Guest
-
markinoregon #4
Re: Re:2 css questions
Where is a CSS Style switcher extension?
I don't think I have that one,,,,hmmm,,,
--
markinoregon
Website under construction as allways!
[url]www.markthesteelhead.com[/url]
"Capt. Verde" <steve@capt-verde.net> wrote in message
news:bg3gl6$bc3$1@forums.macromedia.com...to change it just call out for the different color scheme CSS sheet, you can> Why not create a CSS sheet for each color scheme and if and when you want
even use a extension to allow users to switch which CSS sheet they want to
load to give a appearance they like.>
> Always remember, no matter where ya go....there ya are!
markinoregon Guest
-
David Powers #5
Re: 2 css questions
P@tty *TWB* wrote:
I agree. TopStyle is excellent for keeping things in order. You can also get>>> ... are there any strategies
>> for organizing and keeping straight these big css files?
> If you have (or can get) TopStyle, its "Style Sweeper" is great for
> neatening up style sheets. It automatically groups all the selectors
> by type, and then alphabetically, and formats the rules all nice and
> neat. Might be a start, at least! :-)
10% off by following the link in my sig.
The best strategy for keeping CSS files manageable, though, is to build
stylesheets that make full use of the cascade. I've seen dozens of
stylesheets where the font-family and size is conscientiously repeated for
just about every element on a page. Setting the defaults in the body style
eliminates the need to do that. Then all you need to do is create styles for
elements you want to override the default. The same for colours. Also make
full use of the shorthand properties, such as border, rather than
border-right, border-left, border-top, border-bottom.
Learning how to use the cascade efficiently takes time (I used to write
repetitive rules myself, and I'm sure many are left in my sites), but it
makes things a lot easier in the end.
--
David Powers
*******************************************
No-nonsense reviews of computer books
[url]http://japan-interface.co.uk/webdesign/books.html[/url]
Save 10% on TopStyle CSS Editor
*******************************************
David Powers Guest
-
Capt. Verde #6
Re: Re:2 css questions
Kaosweaver has a great one too...it lets you put some links on a page and associate each one with a certain CSS style sheet that when clicked loads that particular style sheet and change the appearance.
Always remember, no matter where ya go....there ya are!
Capt. Verde Guest
-
Eric A. Meyer #7
Re: 2 css questions
In article <bg3fli$98e$1@forums.macromedia.com>,
"P@tty *TWB*" <payers@NOSPAMnc.rr.com> wrote:
How so?>> > 2) This question is counter-intuitive by its very nature, but humor me for
> > a second... Can you use variables in a .css file.
> To the best of my knowledge, you can't use variables in an *external* style
> sheet, but you can definitely use them in a document style sheet
> (<style></style>) within an HTML (or XHTML) page.
--
Eric A. Meyer
[url]http://www.meyerweb.com/eric/[/url]
Eric A. Meyer Guest
-
middletree #8
Re: 2 css questions
I don't usually bottom-post, but I did this time. Please see below:
"Alexander Ross" <alexross@bleen.net> wrote in message
news:bg3dc7$4he$1@forums.macromedia.com...a> 2) This question is counter-intuitive by its very nature, but humor me forOn> second... Can you use variables in a .css file. Here is why I'd want to:background> my site I use (primarily) 3 different colors. These appear as tdof> colors, as text colors and link colors, as colors for H tags, etc... Lotswant> places! Wouldn't it be nice if at the top of my css file I could have :
>
> var color1: #FFFFFF
> var color2: #990000
> var color3: #CCCCCC
>
> Then later in my sheet I can just set things to "color1". This way if IThis is very possible, at least the way I did it. I'm using ASP. At the top> to change my color scheme, its EASY.
of all my ASP pages, I have an include which calls a little page called
colors.asp. It contains stuff like:
textcolor1="#123456"
bgcolor1="#000000"
Then, in the external css, I have
..maintitle {
color: <%=textcolor1%>
background-color: <%=bgcolor1%>
}
It's been a big help, and when the boss told me to change the color scheme
of the whole web-based app I am writing,, it was very easy to do, easier
than just using CSS.
It's by far the most helpful, creative thing I have ever come up with by
myself.
middletree Guest
-
irvin #9
Re: 2 css questions
"Alexander Ross" <alexross@bleen.net> wrote in message
news:bg3dc7$4he$1@forums.macromedia.com...background> . Can you use variables in a .css file. Here is why I'd want to: On
> my site I use (primarily) 3 different colors. These appear as tdof> colors, as text colors and link colors, as colors for H tags, etc... LotsYes, it is possible. At least with Coldfusion (don't know about ASP, PHP,> places! Wouldn't it be nice if at the top of my css file I could have :
>
> var color1: #FFFFFF
> var color2: #990000
> var color3: #CCCCCC
etc).
I explain the method on another post in this thread.
--
irvin
----------------------------------------
[url]http://www.pixel69.com[/url]
irvin Guest
-
Gary White #10
Re: 2 css questions
On Mon, 28 Jul 2003 17:14:42 -0400, "P@tty *TWB*"
<payers@NOSPAMnc.rr.com> wrote:
You can do it with any server side scripting language. I don't know>At least with CF, by putting the variables right into the style rule.. I'm
>trying to find the CF book where I saw it done, but it seemed pretty
>straightforward. Is there something about that that you know to not be
>do-able?
anything about CF, but in PHP, it might look like this:
<?php
$bcolor="#ff0000";
$fcolor="#ffffff";
?>
<style type="text/css">
<!--
body {
background-color: <?=$bcolor?>;
color: <?=$fcolor?>;
-->
</style>
I suppose ASP could look like this:
<%
bcolor="#ff0000";
fcolor="#ffffff";
%>
<style type="text/css">
<!--
body {
background-color: <%=bcolor%>;
color: <%=fcolor%>;
-->
</style>
Gary
Gary White Guest
-
Al Sparber- PVII #11
Re: 2 css questions
It can be done with any server technology. Eric was probably thinking about
it being done client-side in the css.
--
Al
> At least with CF, by putting the variables right into the style rule.. I'm
> trying to find the CF book where I saw it done, but it seemed pretty
> straightforward. Is there something about that that you know to not be
> do-able?
>
> --
> P@tty Ayers
> [url]http://www.WebDevBiz.com[/url]
> Professional Web Business Tools:
> Web Design Contract, Estimate Worksheet, and more
> --
>
>
Al Sparber- PVII Guest



Reply With Quote

