Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Shital Palve
CSS Apply
1 Answer(s)      3 years and 4 months ago
Posted in : Struts


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


Advertisement
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
CSS
style sheet validates at Note that some warnings may be unavoidable, but your CSS
Advertisements
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
css
css
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
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
What are the advantages and disadvantages of CSS?
What are the advantages and disadvantages of CSS?  What are the advantages and disadvantages of CSS
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
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
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
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
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
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
css click box
css click box  I wanted to create a click box in CSS with a hyperlink that should appears flat.   Find the below given code.. In your HTML file .. click box Text CSS a { display:inline-block; width:30px
css table cell margin
css table cell margin  How can i put margin between two columns(cell margin)?   In your CSS you can set the desired margin between two... this css into your td to set the margin between cells. See how you can include
indent div css
/answers/viewqa/HTML/17553-indent-div-css.html :Indent DIV in CSS
CSS CUSTOMIZATION AUTOMATION TOOL
CSS CUSTOMIZATION AUTOMATION TOOL  Hi all, I need your idea to develop a tool. I will brief the scenario to you. 1, Creating website using... form, and on submit, it should change the styles in the css files in the server
CSS CUSTOMIZATION AUTOMATION TOOL
CSS CUSTOMIZATION AUTOMATION TOOL  Hi all, I need your idea to develop a tool. I will brief the scenario to you. 1, Creating website using... form, and on submit, it should change the styles in the css files in the server
CSS Editor
CSS Editor         This project aims to contribute sophisticated CSS authoring... support for editing CSS source files, with features like: syntax
jQuery CSS Selector
jQuery CSS Selector       jQuery CSS Selector In this section we are learning about the jQuery CSS Selector. The CSS Selectors is the powerful API provided
paragraph height css
paragraph height css  How can i specify height of a paragraph in CSS?   <html> <head> <style type="text/css"> p.p1 {line-height:90%;} p.p2 {line-height:200%;} </style> </head> <body>
Resize Header in CSS
;We can resize header tags in CSS .. and further call that class into you HTML
indent div css
. Indent div in css <html> <head> <title>Indent div
html+css - Java Beginners
reserved Worldwide css /* Theme Name: akido Theme URI
html+css - Java Beginners
development by | Website by   css body
html+css - Java Beginners
by css body { margin: 0; padding: 0; background-color
regarding css file in my eclipse
regarding css file in my eclipse  hai frns i want a small help frm u.when ever i use css file in html or normal web browsers the output is coming means css file is effecting the output but wen i use the same code in myeclipse
CSS hack for Opera9.63 - Java Beginners
CSS hack for Opera9.63  Hi All, I am terribly stuck with a serious Opera 9.63 related issue .Actually I need my application to be tested in IE... for which I tried css hacks like *html:first-child *body:last-child
CSS problem height from top
CSS problem height from top  here i wrote a code but can you tell me how to increase height from top <html> <head> <style type="text/css"> .hello img { height : 100px; width :100px; margin-top
What is HTML 5 and CSS 3
What is HTML 5 and CSS 3 HTML 5 and CSS 3 are the standard versions of the basic HTML and CSS language, which is used to create more interactive web pages... and 3D graphics. Whereas a CSS is used to describes the presentation
how to extract css properties using java?
how to extract css properties using java?  how to extract css properties using java
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
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...):void{ // Apply Effect using setStyle() method roseindia.setStyle
Java, CSS help - Java Beginners
Java, CSS help  I need help about menu and submenu programming? Hi there, I have 6 pages and 6 buttons, i want add submenu to each my main buttons, I have to use below code because I want use this function dynamic
ZF Decorate With CSS
Now Decorate it with CSS: It is obvious that we need some CSS to change... tutorial. First of all create a folder called css in public folder and create a file called site.css inside the css folder (public->css->site.css), now
How to use css in simple HTML application
How to use css in simple HTML application   Please give simple example for understanding purpose
how do i apply the javascript validation functions to the iframe content?
how do i apply the javascript validation functions to the iframe content?  Hi friends am Yogesh Nandane..Developing a small accessibility evaluation... accessibility errors. I want to apply this startframe function to the frame content
how do i apply the javascript validation functions to the iframe content?
how do i apply the javascript validation functions to the iframe content?  Hi friends am Yogesh Nandane..Developing a small accessibility evaluation... accessibility errors. I want to apply this startframe function to the frame content
 

 

 

DMCA.com