CSS Apply

CSS Apply

How can I apply different CSS to my application for background by taking CSS list in Select tag i.e. Combo box. for e.g As in Orkut we select theme & by clicking to apply it changes background theme & color but data is same plz give me solution and respective code for that

View Answers

July 30, 2011 at 10:00 PM

Create two html pages and 3 different style sheets.. below is list of all files..

but it can be done in php... download wampserver from www.wampserver.com it will be installed in c:\wamp drive go in c:\wamp\www paste all files in www folder.. now start wampserver from start and go to browser and write following address--localhost/themes.php

/themes.php/

<form name="mytheme" action="selection.php" method="post">

<select name="themes">
<option value="default">Default</option>
<option value="red">Red</option>
<option value="green">Green</option>
</select>
<input type="submit" value="Apply">
</form>



/*selection.php*/
<html>
<head>

<?php
$themes=$_POST['themes'];

if($themes=='default')
{
echo '<link rel="stylesheet" type="text/css" href="default.css">';
}
else if($themes=='red')
{
echo '<link rel="stylesheet" type="text/css" href="red.css">';
}
else
{
echo '<link rel="stylesheet" type="text/css" href="green.css">';
}


?>
</head>
<body>
hi..
</body>
</html>


/*default.css*/
body
{
background-color:lavender;
}




/*red.css*/
body
{
background-color:red;
}



/*green.css*/
body
{
background-color:green;
}









Related Tutorials/Questions & Answers:
CSS Apply
CSS Apply  How can I apply different CSS to my application for background by taking CSS list in Select tag i.e. Combo box. for e.g As in Orkut we select theme & by clicking to apply it changes background theme & color
ModuleNotFoundError: No module named 'apply'
ModuleNotFoundError: No module named 'apply'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'apply' How to remove the ModuleNotFoundError: No module named 'apply'
Advertisements
CSS
style sheet validates at Note that some warnings may be unavoidable, but your CSS
ModuleNotFoundError: No module named 'ansible-apply'
ModuleNotFoundError: No module named 'ansible-apply'  Hi, My... 'ansible-apply' How to remove the ModuleNotFoundError: No module named 'ansible-apply' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'ansible-apply'
ModuleNotFoundError: No module named 'ansible-apply'  Hi, My... 'ansible-apply' How to remove the ModuleNotFoundError: No module named 'ansible-apply' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apply-defaults'
ModuleNotFoundError: No module named 'apply-defaults'  Hi, My... named 'apply-defaults' How to remove the ModuleNotFoundError: No module named 'apply-defaults' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apply-pr'
ModuleNotFoundError: No module named 'apply-pr'  Hi, My Python... 'apply-pr' How to remove the ModuleNotFoundError: No module named 'apply-pr... to install padas library. You can install apply-pr python with following
ModuleNotFoundError: No module named 'partial-apply'
ModuleNotFoundError: No module named 'partial-apply'  Hi, My... 'partial-apply' How to remove the ModuleNotFoundError: No module named 'partial-apply' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'ansible-apply'
ModuleNotFoundError: No module named 'ansible-apply'  Hi, My... 'ansible-apply' How to remove the ModuleNotFoundError: No module named 'ansible-apply' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apply_firewall'
ModuleNotFoundError: No module named 'apply_firewall'  Hi, My... named 'apply_firewall' How to remove the ModuleNotFoundError: No module named 'apply_firewall' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apply-pr'
ModuleNotFoundError: No module named 'apply-pr'  Hi, My Python... 'apply-pr' How to remove the ModuleNotFoundError: No module named 'apply-pr... to install padas library. You can install apply-pr python with following
ModuleNotFoundError: No module named 'apply_firewall'
ModuleNotFoundError: No module named 'apply_firewall'  Hi, My... named 'apply_firewall' How to remove the ModuleNotFoundError: No module named 'apply_firewall' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'apply-defaults'
ModuleNotFoundError: No module named 'apply-defaults'  Hi, My... named 'apply-defaults' How to remove the ModuleNotFoundError: No module named 'apply-defaults' error? Thanks   Hi, In your python
JavaScript Array Apply
JavaScript Array Apply       In this section, you will study how to use the apply() method. ... the apply method to call the Car constructor. In the Car function, the keyword
how to apply tool bar with textarea in jsp
how to apply tool bar with textarea in jsp  how to apply tool bar with textarea in jsp
how to apply globalisation to a world wide asp.net application
how to apply globalisation to a world wide asp.net application   how to apply globalisation concept on a asp.net web page
Apply more than one xsl for single XML
Apply more than one xsl for single XML  How to apply more than one xsl for same xml file
ModuleNotFoundError: No module named 'apply-argument-parser'
ModuleNotFoundError: No module named 'apply-argument-parser'  Hi...: No module named 'apply-argument-parser' How to remove the ModuleNotFoundError: No module named 'apply-argument-parser' error? Thanks   Hi
ModuleNotFoundError: No module named 'python-apply-linkedin'
ModuleNotFoundError: No module named 'python-apply-linkedin'  Hi...: No module named 'python-apply-linkedin' How to remove the ModuleNotFoundError: No module named 'python-apply-linkedin' error? Thanks   Hi
ModuleNotFoundError: No module named 'apply-argument-parser'
ModuleNotFoundError: No module named 'apply-argument-parser'  Hi...: No module named 'apply-argument-parser' How to remove the ModuleNotFoundError: No module named 'apply-argument-parser' error? Thanks   Hi
ModuleNotFoundError: No module named 'ansible_role_apply'
ModuleNotFoundError: No module named 'ansible_role_apply'  Hi, My... named 'ansible_role_apply' How to remove the ModuleNotFoundError: No module named 'ansible_role_apply' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'os-apply-config'
ModuleNotFoundError: No module named 'os-apply-config'  Hi, My... named 'os-apply-config' How to remove the ModuleNotFoundError: No module named 'os-apply-config' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'ansible_role_apply'
ModuleNotFoundError: No module named 'ansible_role_apply'  Hi, My... named 'ansible_role_apply' How to remove the ModuleNotFoundError: No module named 'ansible_role_apply' error? Thanks   Hi, In your
HTML CSS
HTML CSS  Explain in brief about the term CSS
CSS in flex
CSS in flex  Hi....... Please tell me How can I load CSS style... dynamically loading of CSS file is not supported in flex. you can compile the CSS file in swf and use it dynamically in your application. Loading style
CSS in Flex
CSS in Flex  Hi...... Please tell me How do you use css styles in flex? Thanks  Ans: @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .button{ font
What are the advantages and disadvantages of CSS?
What are the advantages and disadvantages of CSS?  What are the advantages and disadvantages of CSS
css
css
css
Working with CSS(CSS Manipulation)
Working with CSS(CSS Manipulation)       Working with CSS(CSS Manipulation) These methods are used to manipulate CSS specially by getting and setting
ModuleNotFoundError: No module named 'css'
ModuleNotFoundError: No module named 'css'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'css' How to remove the ModuleNotFoundError: No module named 'css' error
ModuleNotFoundError: No module named 'css'
ModuleNotFoundError: No module named 'css'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'css' How to remove the ModuleNotFoundError: No module named 'css' error
ModuleNotFoundError: No module named 'css'
ModuleNotFoundError: No module named 'css'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'css' How to remove the ModuleNotFoundError: No module named 'css' error
parser jquery css
parser jquery css  How to parser jquery in css
How to apply for Henry Harvin's Data Science online training?
How to apply for Henry Harvin's Data Science online training?  Hi, I... for the tutorials to learn: How to apply for Henry Harvin's Data Science online... the topic "How to apply for Henry Harvin's Data Science online training
How to apply for Henry Harvin's Data science training online?
How to apply for Henry Harvin's Data science training online?  Hi, I... for the tutorials to learn: How to apply for Henry Harvin's Data science training... the topic "How to apply for Henry Harvin's Data science training online
Include CSS in HTML
Include CSS in HTML  Can any one tell me how to include a CSS file into my HTML page. A code format to include the CSS will work. Thanks in Advance.   Include CSS in HTML To include a CSS or Style Sheet into you HTML
Apply MX Effect using Style in Flex4
Apply MX Effect using Style in Flex4: In this example you can see how we can apply the effect to the component using Style. We have to use a Image component for apply the rollOverEffect and rollOutEffect using Style. Example
CSS Designer
CSS Designer         CSS Designer is now availabe as part of the Web Designer. JointLogic CSS Designer is an Eclipse plugin that provides CSS authoring facilities
Apply MX Effect using setStyle() method in Flex4
Apply Effect using setStyle() method in Flex4: In this example you can see how we can apply the effect using setStyle() method. in this example we use... function applyTrigger(event:Event):void{ADS_TO_REPLACE_8 // Apply Effect
CSS ScrollBar Properties
CSS ScrollBar Properties  How can i set ScrollBar properties in CSS? I am using HTML, CSS and Div in my code. Thanks!!   overflow: scroll; overflow-y: scroll; overflow-x: scroll; overflow:-moz-scrollbars-vertical
background images in css not working
background images in css not working  In the application i'm passing a background image from CSS in the given format ... background-image: url... of adding background images in css
link border 0 css
link border 0 css  Hi, What will the css for making links border 0 in image? I am looking for example code for link border 0 css. (adsbygoogle = window.adsbygoogle || []).push({}); Thanks
HTML CSS example
HTML CSS example  Hi, Can anyone share the HTML CSS example code. I my HTML web page I have to embed the CSS style. Share some HTML CSS example...({});   Hi, You can use the following code to define CSS in HTML page: <
Create Button in CSS
Create Button in CSS  Can anyone help me to create a button in CSS HTML
div align left css
div align left css  Hi, How to align the div to left using the css in HTML page. Thanks
paragraph height css
paragraph height css  How can i specify height of a paragraph in CSS?   This is how you can set the Height of Paragraph in CSS .pclass { height:200px; } <p class="pclass"> some text </p>
java swing and CSS
java swing and CSS  can css be used in java swing desktop application in different forms for better styles?plzz help
mouse over effects in css
mouse over effects in css  I have written a mouse over effect in CSS. But it is not working in HTML. Can any one suggest me? Thanks

Ads