Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 02-23-2010, 10:02 PM padding for an image
Ultra Talker

Posts: 254
Trades: 0
padding

i am using a jquery tab from this website http://jqueryui.com/demos/tabs/

for the tabs i am using only 2 images
when the page loads one of the images content will be displayed and when the second image is clicked the content for the second image will appear

however when any of the images is clicked the other image should change

following is my code

<div id="tabs" width: 269px;" >
<ul>
<li><a href="#dress"><span><img src="assets/img/blank-green.gif" /></span></a></li>
<li><a href="#thisstyle"><span><img src="assets/img/about-this-style-grey.gif" />
</span></a></li>
</ul>

<div id="dress" style="height: 250px; width: 269px !important;">
content for tab1
</div> <!-- dress -->

<div id="thisstyle" style="height: 250px; width: 269px !important;">
content for tab2
</div> <!-- thisstyle -->

</div><!-- tabs -->

following is the css code for this jquery tab effect

#tabs{
float: left;
width: 500px;
height: 500px;
}


.ui-tabs {
float: left;
}
.ui-tabs .ui-tabs-nav {
background: url('img/tabsBg.gif') no-repeat;
float: left; width: 500px; height: 36px; margin: 0;
}
.ui-tabs .ui-tabs-nav li {
float: left;
}
.ui-tabs .ui-tabs-nav li a {
float: left; text-decoration: none; padding: 12px 17px 0 17px; height: 24px;
color: #fff;
}
.ui-tabs .ui-tabs-nav li a:hover {
color: #fff;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
/*padding: 12px 17px 0 17px; height: 24px;*/
float: left; outline: 0; color: #93b650; background-color: #555;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a {
cursor: text;
}
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
display: block; float: left; width: 500px;
}
.ui-tabs .ui-tabs-hide {
position: absolute;
left: -999px;
display: block;
}

i need to change the code
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a{}

so that when any of the 2 images is clicked the other image should be something else

please advice how i can change the code so that i can change the image when any of the 2 images is clicked

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-25-2010, 04:22 AM Re: padding for an image
Novice Talker

Posts: 8
Trades: 0
You can write a method and call that method in image onclick event...
The location of the image you wanted to change can be put in script part...
If this is not what you are asking for, please clarify where the images are plaed... I hope on the forum and not in tabs...
__________________

Please login or register to view this content. Registration is FREE
Nissan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to padding for an image
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16807 seconds with 12 queries