473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Reuse some existing css value?

Hello,

Consider I have a background-color set to red, e.g.

#header { background-color: red }

This value is a variable - can be changed by user

I want the footer to also use this value, something like e.g.

#footer {
background-color: {$header_background_color}
}
besides using script such as PHP, is it possible to do this in pure
css?

thanks.

Sep 7 '07 #1
1 2411
howa wrote:
Hello,

Consider I have a background-color set to red, e.g.

#header { background-color: red }

This value is a variable - can be changed by user

I want the footer to also use this value, something like e.g.

#footer {
background-color: {$header_background_color}
}
besides using script such as PHP, is it possible to do this in pure
css?
No CSS does not have variables. You can do

#header, #footer { background-color: red; }

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: DPfan | last post by:
What's exactly the meaning of "code reuse" in C++? Why such kind of reuse have more advantages over the counterpart in other language like in C? How is "code reuse" realized in C++? By...
1
by: Bob Dufour | last post by:
I created a form for enetering values in lookup tables (eg Phone Types) in a project. The form uses a SQLdataAdapter and works fine in project A. In another solution - Project B- I want to reuse...
2
by: VJ | last post by:
I have the option "Reuse windows for launching shortcuts" checked in my IE. Now in my client code on a click event of a link, I do the following, Dim procWebPages As Process Dim strWebPageLink...
3
by: steph | last post by:
Hi, I've got below function to dynamically define and run pass-through queries. This works OK. But I don't want to have the connection string hard-coded, instead I want to reuse the existing...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
2
by: Nanker | last post by:
Our existing ASP.NET web application does store a session ID in the cookies (ASP.Net_SessionID) for a logged in user. A new requirement has been stated that we need to be able to send a customer an...
19
by: jacob navia | last post by:
There is an interesting discussion running in Slashdot now, about code reuse. The thema of the discussion is here: < quote > Susan Elliot Sim asks: "In the science fiction novel, 'A Deepness...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
6
by: Bart Simpson | last post by:
I remember reading on parashift recently, that "Composition is for code reuse, inheritance is for flexibility" see (http://www.parashift.com/c++-faq-lite/smalltalk.html#faq-30.4) This confused...
11
by: aaapaul | last post by:
We are planning a greater .NET Application-System (WindowsForms) with Visual Studio 2005. One of my problem is, how to design the objects, that they can be reused. E.g. I have a form (with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.