473,387 Members | 1,534 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.

Populate Css Values from database

Hello

I need some help on how to populate CSS style sheet with values from the database? :)
Jul 14 '06 #1
5 3321
sashi
1,754 Expert 1GB
Hi there,

emm.. well.. can be done but you have spare alot of you valuable time in terms of coding.. you might have to create alot of tables as well as fields in your database to store those values.. you will also have write alot of code when it comes to loading those values from your database as well.. good luck my fren.. :)
Jul 15 '06 #2
Thanks Sashi
Jul 17 '06 #3
If done well, this could be a cool concept, if done bad your DBA will kick you out of the office. There is a danger of creating a lot of blank fields if you approach this the wrong way. What I would do is build tree tables. That way you will have have no blank fields and hardly any data redundency:

pardon for the poor English

ex.

table CSS class--------------------------------------

ID
name
web_page_ID

table CSS class attributes----------------------

ID
name
CSS class - FK_ID

table CSS class attribute values-----------------
ID
CSS class attribute - FK_ID
value


If you do it like this you DBA will be happy

bsw
Jul 21 '06 #4
sashi
1,754 Expert 1GB
Hi guys,

i would suggest using themes instead.. i feel it's more flexible and practical when it comes to .css style sheet..
Jul 22 '06 #5
Banfa
9,065 Expert Mod 8TB
Sorry to pour water on your fire but I recently created a dynamic CSS page using PHP, it used a session variable to control the layout.

This worked fine in IE but didn't work at all in Firefox. My conclusion was that if you are going to have dynamic CSS then you will either have to
  1. Have static external style sheets and use server side scripting in the HTML to decide which style sheet to link to.
  2. Have internal style sheets, then you can use server side scripting to write the files, but this removes 1 of the advantanges of CSS namely the styles are in an external file and don't need downloading everytime.
Jul 25 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: julian | last post by:
hi I was wondering if anyone can help me out on this.... I have dynamcally populated a drop down menu with data from an access database using ASP. The values seem fine, however when i pass...
0
by: Nithin | last post by:
My code as an txt attachment. I have 2 drop down list boxes that on selection populate text boxes from my database table. I am able to display the correct values in these text boxes. I have 2...
3
by: Yul | last post by:
Hi, We are in the process of designing an ASP.NET app, where a user will enter some 'Customer ID' to be queried in the database. If the ID is valid, several stored procedures will be called to...
3
by: Jordan | last post by:
Suppose I have a system that keeps track of 5 different types of "People". My intent is to have a base Person class, then 5 derived classes for each of the specific person types (e.g., Patient,...
1
by: Flanman | last post by:
I have an ASP web form that I want to populate fields based on the first field choice. Example I have 4 fields item, price, delivery, availability. I have all these items setup in an access table....
1
by: freekedoutfish | last post by:
Hi. New member here Im sat at work, pounding my head off the desk because this tiny bit of simple code refuses to work. The sub is intended to pull data from the "companyname" column in the...
5
by: jdwyer05 | last post by:
Hello, I am trying to populate a combo box with only unique values. Currently I am using an access database and VB6 Enterprise. The program populates the combo box fine however, there are several...
1
by: MastaKay | last post by:
I hv dropdownlist on a c# page connected to a database(MS Access). I want to get values onto my datagrid when I select a value from the dropdownlist.The Item I select from the dropdown will...
4
by: olidenia | last post by:
I need some help or tips on the following. I have a .sql database file with the folowing structure: DROP TABLE IF EXISTS `car`; CREATE TABLE IF NOT EXISTS `car` ( `id` int(10) default...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.