رفتن به مطلب

hover


پست های پیشنهاد شده

الان چند خط کد به header.php اضافه کردم که باعث شد در ie درست بشه

الان فقط در firefox اشکال داره

این کد header.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--[if IE 7]>

<html class="ie ie7" <?php language_attributes(); ?>>

<![endif]-->

<!--[if IE 8]>

<html class="ie ie8" <?php language_attributes(); ?>>

<![endif]-->

<!--[if !(IE 7) | !(IE 8) ]><!-->

<html <?php language_attributes(); ?>>

<!--<![endif]-->

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<meta http-equiv="X-UA-Compatible" content="IE=7" />

<title><?php bloginfo('name'); ?><?php wp_title('|'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen" />

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />

<!--[if lt IE 7 ]>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/DD_belatedPNG_0.0.8a-min.js"></script>

<![endif]-->

<?php wp_head(); ?>

</head>

<body>

<div id="main">

<div class="logo">

</div>

<div id="container">

<ul id="menu">

<li><a href="<?php bloginfo('url'); ?>">صفحه اصلی</a></li>

<li><a href="<?php bloginfo('url'); ?>/catalog">کاتالوگ</a></li>

<li><a href="<?php bloginfo('url'); ?>/events">تازه چه خبر!</a></li>

<li><a href="<?php bloginfo('url'); ?>/about">درباره ما</a></li>

<li><a href="<?php bloginfo('url'); ?>/contact">تماس با ما</a></li>

<li><a href="<?php bloginfo('url'); ?>/en">English</a></li>

</ul>

<div id="header">

<a href="<?php bloginfo('url'); ?>"></a>

</div>

</div>

لینک به ارسال

من منظورم کدهای css بود نه html. و تو تاپیک زمانی که می خواید کد بزارید سعی کنید توی تگ بزارید.

  • امتیاز 1
لینک به ارسال

/*
Theme Name: Tavansazan
Description: Tavansazan Template
Author: Shahin SN
Author URI: http://www.shahin7.com
Version: 1.0.1
*/
@font-face {
font-family: 'BKoodak';
src: url('fonts/BKoodakBold.eot?#') format('eot'), /* IE6?8 */
url('fonts/BKoodakBold.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
url('fonts/BKoodakBold.ttf') format('truetype'); /* Saf3?5, Chrome4+, FF3.5, Opera 10+ */
}
a, abbr, acronym, address, applet, article, aside, audio, b, blockquote, big, center, canvas, caption, cite, code, command, datalist, dd, del, details, dfn, dl, div, dt, em, embed, fieldset, figcaption, figure, font, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, keygen, label, legend, li, meter, nav, object, ol, output, p, pre, progress, q, s, samp, section, small, span, source, strike, strong, sub, sup, table, tbody, tfoot, thead, th, tr, tdvideo, tt, u, ul, var {
background: transparent;
border: 0 none;
font-size: 100%;
margin: 0;
padding: 0;
border: 0;
outline: 0;
vertical-align: top;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
table, table td {
padding: 0;
border: none;
border-collapse: collapse;
}
img {
vertical-align: top;
}
embed {
vertical-align: top;
}
* {
border: none
}
input, textarea {
outline: none !important
}
/* Getting the new tags to behave */
article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, meter, nav, output, progress, section, source, video {
display: block;
}
mark, rp, rt, ruby, summary, time {
display: inline
}
body {background: #f0f0f0; font-family: tahoma; direction:rtl; text-align:center}
#main { width:890px; position:relative; padding:5px;margin:0px auto;}
.logo {background:url(images/logo.png); width:100px; height:100px; position:absolute; top:0px; right:40px;}
#container {margin:-5px auto 0px; width:580px;}
#menu {margin-right:4px}
#menu li {float:right; background:url(images/bg-menu.jpg); text-align:center; margin:0 1px 20px 1px;}
#menu li a{font-size:12px; padding:2px; color:#999; text-decoration:none; display:block; border:1px #dadada solid; width: 87px; height:18px;}
#menu li a:hover{color:#76584e; text-decoration:none; display:block; border:1px #76584e solid;}
#header {clear:both; width:566px; height:77px; background:url(images/bg-header.jpg);border:1px #dadada solid; margin:2px auto -1px; position:relative}
#header a{position: absolute; top: 3px;right: 0px; display:block; background:url(images/tavan.png);width:550px; height:70px}
.content {margin:0px auto; width:890px; position:relative}
#right {width:161px; position:absolute; right:2px; top:0px}
#left {width:161px; position:absolute; left:2px; top:0px}
#right a{ background-image:url(images/sidebar_bgri.png);background-repeat:no-repeat;display:block; width: 160px; height:108px; margin-bottom:4px}
#left a{ background-image:url(images/sidebar_bgl.png);background-repeat:no-repeat;display:block; width: 160px; height:108px; margin-bottom:4px}
a span {display:none}
#l1 {background-position:0px 0px;}
#l2 {background-position:0px -110px;}
#l3 {background-position:0px -220px;}
#l4 {background-position:0px -329px;}
.active {background-position-x:-320px !important}
#l1:hover,#l2:hover,#l3:hover,#l4:hover {background-position-x: -160px}
#content {min-height:440px; border:1px #dadada solid; width:566px; background:#fff; margin:0px auto;}
.slider {border:1px #dadada solid; width:516px; height:287px; margin:25px auto;}
.post {width:516px; margin:25px auto; background:#fff; text-align:justify}
.post h1{
border-bottom: 1px solid #D6D5D3;
padding-bottom: 2px;
float:right;
width:100%;
font-family: BKoodak;
}
.post h1 a{text-decoration:none}
.post h1 div{background: #D6D5D3;
border-radius: 10px 10px 0px 0px;
padding: 5px 10px 2px;
color: #114c8c;
font-size:18px;
}
.post h1 div a{
text-decoration:none;
color:#114c8c;}
.post h1 div a:hover{color:#76584E;}
#searchform {position: absolute; bottom:-30px; left:0px; float:right}
#searchform #s{font-family:tahoma; background: url('images/search-bg.png') no-repeat transparent 0px 0px; border: 0px; width: 100px; height:26px; padding: 0 10px 0; position:relative; }
#searchform #searchsubmit {width: 34px; height: 26px; border: 0px; background: url('images/search-submit.png') no-repeat transparent 0px 0px; position: absolute; top: 0px; left: 120px;}
#searchform #searchsubmit:hover { background-position: 0 -26px;}
#footer {clear:both; padding-top:4px;margin:0px auto;width:890px}
.footer {color: #999; text-align:center; font-size:12px; font-family:arial;}
.navlist {margin:0px auto; padding-top:8px;text-align:center;width:80px}
.navlist {margin-right:60px\9;width:100% !important\9;}
#navlist{position:relative;}
#navlist li{margin:0;padding:0;list-style:none;position:absolute;top:0;}
#navlist li, #navlist a{height:22px;display:block; box-shadow: 0px 0px 1px 0px #AAA; border-radius:4px}
#rss{background: url('images/icons.png') no-repeat 0 0; left:0px; width:23px}
#fb{background: url('images/icons.png') no-repeat -23px 0; left: 30px; width:23px}
#yt{background: url('images/icons.png') no-repeat -46px 0; left: 60px; width:23px}
#rss a:hover{background: url('images/icons.png') no-repeat 0 -22px;}
#fb a:hover{background: url('images/icons.png') no-repeat -23px -22px;}
#yt a:hover{background: url('images/icons.png') no-repeat -46px -22px;}
.entry{ font-size:12px; font-family:tahoma; padding:10px 0px 10px 0px; clear:both}
.entry a{text-decoration:none}
.entry strong{color:#114C8C}
.entry p{
padding-bottom: 10px;
line-height: 22px;
word-wrap: break-word;
}
.entry ul{
list-style:square;
color: #114C8C;
padding-right:20px;
}
.entry table a:link {
color: #666;
font-weight: bold;
text-decoration:none;
}
.entry table a:visited {
color: #999999;
font-weight:bold;
text-decoration:none;
}
.entry table a:active,
.entry table a:hover {
color: #bd5a35;
text-decoration:underline;
}
.entry table {
font-family:Tahoma, Arial, Helvetica, sans-serif;
color:#666;
font-size:12px;
text-shadow: 1px 1px 0px #fff;
background:#eaebec;
margin:20px;
border:#ccc 1px solid;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
-moz-box-shadow: 0 1px 2px #d1d1d1;
-webkit-box-shadow: 0 1px 2px #d1d1d1;
box-shadow: 0 1px 2px #d1d1d1;
}
.entry table th {
padding:21px 25px 22px 25px;
border-top:1px solid #fafafa;
border-bottom:1px solid #e0e0e0;
background: #ededed;
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#ebebeb));
background: -moz-linear-gradient(top, #ededed, #ebebeb);
border-right: solid 1px #DFDCDC;
}
.entry table th:first-child{
text-align: center;
padding-left:20px;
}
.entry table tr:first-child th:first-child{
-moz-border-radius-topleft:3px;
-webkit-border-top-left-radius:3px;
border-top-left-radius:3px;
}
.entry table tr:first-child th:last-child{
-moz-border-radius-topright:3px;
-webkit-border-top-right-radius:3px;
border-top-right-radius:3px;
}
.entry table tr{
text-align: center;
padding-left:20px;
}
.entry table tr td:first-child{
text-align: center;
padding-left:20px;
border-left: 0;
}
.entry table tr td {
padding:18px;
border-top: 1px solid #ffffff;
border-bottom:1px solid #e0e0e0;
border-left: 1px solid #e0e0e0;
vertical-align: middle;
background: #fafafa;
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
}
.entry table tr.even td{
background: #f6f6f6;
background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f6f6f6));
background: -moz-linear-gradient(top, #f8f8f8, #f6f6f6);
}
.entry table tr:last-child td{
border-bottom:0;
}
.entry table tr:last-child td:first-child{
-moz-border-radius-bottomleft:3px;
-webkit-border-bottom-left-radius:3px;
border-bottom-left-radius:3px;
}
.entry table tr:last-child td:last-child{
-moz-border-radius-bottomright:3px;
-webkit-border-bottom-right-radius:3px;
border-bottom-right-radius:3px;
}
.entry table tr:hover td{
background: #f2f2f2;
background: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#f0f0f0));
background: -moz-linear-gradient(top, #f2f2f2, #f0f0f0);
}
.result{ font-size:12px; font-family:tahoma; padding:10px 0px; clear:both}
.alignright {padding: 10px 10px;
float: right;
border-left: dashed 1px #D6D5D3;
margin:0 0 15px 10px;
}
.alignleft {padding: 0px 10px;
float: left;
border-right: dashed 1px #D6D5D3;
margin:0 10px 15px 0;
}
.current_page_item {display:none}
.page_item {width: 230px; height:30px; background: #f8f9f9 url('images/bgli.jpg'); border: 1px solid #dadada;margin:5px; padding: 2px 15px 0 0}
.page_item a{background: url('images/bullet.jpg') no-repeat right center; padding-right:24px; color:#114C8C; font-family:BKoodak; text-decoration:none}
.page_item a:hover{background: url('images/bulleth.jpg') no-repeat right center; color: #76584E}
#p-10 img{width:250px; margin-top:5px}
.snvdshc .ui-tabs .ui-tabs-nav li{float:right !important;}
.clear {clear:both; !important;}
.clearfix {clear:both;}

.wpcf7-form-control-wrap input[type="text"], .wpcf7-form-control-wrap textarea, .wpcf7-form-control-wrap select {
background: #F7F7F7 url(images/contact_input.png) repeat-x !important;
border: 1px solid #CCC !important;
color: #111 !important;
padding: 8px !important;
border-radius: 8px !important;
-webkit-border-radius: 8px !important;
-moz-border-radius: 8px !important;
margin: 0px !important;
font-family: tahoma !important;
}
.wpcf7-form-control-wrap select {
background:#F7F7F7 !important;
}
.wpcf7-form-control-wrap input[type="text"] {
width:300px;
}
.wpcf7-form-control-wrap textarea {
width:400px;
}
.wpcf7-captchar, .wpcf7-quiz {
width:65px !important;
}
span.wpcf7-list-item {
margin-left: 0 !important;
}
.wpcf7-submit, .wpcf7-reset {
border: 0px !important;
color: #4C4B4B !important;
float: right;
font-size: 12px;
text-shadow: 1px 1px 1px white;
text-transform: uppercase;
margin-right: 9px;
height: 35px;
}
.wpcf7-submit {
background: url(images/contact_submit.png) no-repeat;
width: 73px;
margin-right: 6px;
font-family: BKoodak;
font-size: 16px;
}
.wpcf7-reset {
background: url(images/contact_reset.png) no-repeat;
width: 61px;
}
.wpcf7-list-item-label {
padding-left: 20px;
}
span.wpcf7-list-item {
display: block}
.page-item-506
{display:none}
.more {
text-decoration: none}

این کد style.css

لینک به ارسال

در این استایل شما چندین هاور وجود داره ، ما از کجا بفهمیم شما کدومو میگی ؟

لطفا css مربوط رو قرار بدید و همچنین بگید چطور فراخوانی میکنین ؟

لینک به ارسال

ببینید قسمت l1 و l2 و l3 و l4 که براش background تعریف شده رو نگاه کنید و اینها رو در فایل leftsite.php که اینجا گذاشتم فراخوانی شده


<div class="block" id="left">
<a onmouseover="display_image('<?php bloginfo('template_directory'); ?>/images/tahghigh.jpg')" onmouseout="reset_starspace()" <?php active_class('tahghigh'); ?> title="تحقیق و توسعه خودرو" id="l1" href="<?php bloginfo('url'); ?>/tahghigh"></a>
<a onmouseover="display_image('<?php bloginfo('template_directory'); ?>/images/test.jpg')" onmouseout="reset_starspace()" <?php active_class('test'); ?> title="تست انتهای خطوط تولید خودرو" id="l2" href="<?php bloginfo('url'); ?>/test"></a>
<a onmouseover="display_image('<?php bloginfo('template_directory'); ?>/images/moayene-fani.jpg')" onmouseout="reset_starspace()" <?php active_class('moayene-fani'); ?> title="خطوط معاینه فنی خودرو و موتور سیکلت" id="l3" href="<?php bloginfo('url'); ?>/moayene-fani"></a>
<a onmouseover="display_image('<?php bloginfo('template_directory'); ?>/images/tajhizat.jpg')" onmouseout="reset_starspace()" <?php active_class('tajhizat'); ?> title="تجهیزات تعمیرگاهی خودرو" id="l4" href="<?php bloginfo('url'); ?>/tajhizat"></a>
<?php include(TEMPLATEPATH.'/searchform.php'); ?>
</div>

لینک به ارسال
مهمان
این موضوع برای عدم ارسال قفل گردیده است.
×
×
  • اضافه کردن...