Jump to content

Div inside td


arunpatal

Recommended Posts

Hi,

 

I am using jquery for hover effect on div

 

here is the code

 

<style type="text/css">
body{margin:0px;}
#menu{background:#FFF; border:#1E1E1E 0px solid; padding:8px 0px 9px 0px;}
.style1 {
background-color:#FFF;
font-size:16px; color:#666;
padding:10px 50px 10px 50px;
border-right:#1E1E1E 1px solid;
text-decoration:none;
}
.style2 {
background-color:#055F7C;
font-size:16px; color:#FFF;
padding:10px 50px 10px 50px;
border-right:#1E1E1E 1px solid;
text-decoration:none;
}
#header_menu_tr{
height:30px;
}
#header_menu_td{
background:#FFF;
text-align:left;
}
.header_menu_div{
padding-left:30px;
width:980px;
margin:auto;
float:left;
}
/* End styles for the menu elements */
</style>
</head>
<table id="header_table">

<tr id="header_top_tr">
<td id="header_left_td"> </td>
<td id="header_center_td"> </td>
<td id="header_right_td"> </td>
</tr>

<tr id="header_menu_tr">
<td id="header_menu_td" colspan="3">

<div class="header_menu_div" id="menu"><a class="style1" href="#">Home</a><a class="style1" href="#">Home</a></div>
</td>
</tr>
</table>

 

But on left side there is 1px margin and i dont want this.

checkout image.

post-133288-0-70632900-1359134333_thumb.png

Edited by arunpatal
Link to comment
Share on other sites

How are we supposed to help you when you omitted the jquery plugin specifics?

 

Hi

 

This is jquery code

 

<script type="text/javascript" src="style/jQuery.js"></script>
<script type="text/javascript" src="style/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Mouse Enter Animation Mechanism
$("#menu a").mouseenter(function () {
$(this).switchClass("style1", "style2", 500);
});
// Mouse Leave Animation Mechanism
$("#menu a").mouseleave(function () {
$(this).switchClass("style2", "style1", 500);
});
});
</script>

 

Should i upload jquery-ui.min.js file also ????

 

Hope this problem can be solve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.