CSS Apply

Ads
 

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;
}

Ads









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
CSS
style sheet validates at Note that some warnings may be unavoidable, but your CSS
Advertisements
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'
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-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 '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_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-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_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
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
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
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
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 with me. Thanks   Hi, You can use the following code to define CSS
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 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
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. Thanks
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

Ads