/    Sign up×
Community /Pin to ProfileBookmark

padding for an image

padding

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

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

to post a comment
CSS

0Be the first to comment 😎

×

Success!

Help @sudhakararaog spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...