Форум программистов, компьютерный форум, киберфорум
WordPress
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
 
Рейтинг 4.57/14: Рейтинг темы: голосов - 14, средняя оценка - 4.57
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
1

2 css файла

30.08.2013, 17:09. Показов 2783. Ответов 23
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Люди, подскажите как подключить второй css файл, для ie, вставляю в header.php своей темы код <!--[if lte IE 7]><link href="ie.css"
rel="stylesheet" type="text/css" /><![endif]-->
Но это не помогает, если честно, то вообще не нашёл, где идёт ссылка на style.css, помогите разобраться.

Добавлено через 5 минут
или может быть можно в самы css файл вставить условие?
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
30.08.2013, 17:09
Ответы с готовыми решениями:

WordPress 4.8 editor “Failed to load content css”- “не удалось загрузить содержимое CSS
Добрый день. После обновлении WordPress до версии 4.8 стало появляться предупреждение Failed to...

Есть 2 файла html и css как мне сделать чтоб файл css распространялся на одну ячейку а не на все
&lt;table class=&quot;s&quot;&gt; &lt;tr&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot;...

Вызов less-файла из файла с css-стилями
Добрый вечер, форумчане! Кто скажет можно ли less миксины вынести в отдельный файл и вызывать их из...

Подключение css файла
Хочу подключить файл main.css Ввожу &lt;link href = &quot;main.css&quot; rel = &quot;stylesheet&quot; &gt; но его не...

23
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 17:24 2
Так вставляй:
PHP
1
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie.css" type="text/css" />
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 17:30  [ТС] 3
в header.php? а вместо template_url просто адрес сайта или полный путь к файлу?
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 17:59 4
Цитата Сообщение от tarasow Посмотреть сообщение
в header.php? а вместо template_url просто адрес сайта или полный путь к файлу?
Да, в header.php. Прямо так как я показал, ничего не меняя. (ie.css, ессно, должен быть в корне темы)

См. bloginfo

Добавлено через 5 минут
Цитата Сообщение от tarasow Посмотреть сообщение
<!--[if lte IE 7]>
А тут у тебя очепятка
Надо
HTML5
1
<!--[if lt IE 7]>
(лишний символ после lt)
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 18:10  [ТС] 5
PHP
1
2
3
4
<!--[if IE]>
<link rel="stylesheet" src="<?php bloginfo('template_url'); ?>/all.css" type="text/css" media="screen">  
<![endif]--> 
</head>
блин, почему то все равно не работает...
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 18:29 6
Цитата Сообщение от tarasow Посмотреть сообщение
блин, почему то все равно не работает...
Что значит "не работает"? В исходном коде страницы есть ссылка на файл стилей?
Файл all.css находятся в корне теме? Права на него есть? По прямому урлу открывается?

Цитата Сообщение от tarasow Посмотреть сообщение
<!--[if IE]>
А где версию потерял ?
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 18:41  [ТС] 7
Цитата Сообщение от SergWP Посмотреть сообщение
А где версию потерял ?
Да я хотел для всех версий ie сделать отдельный файл, all.css, но вот не задача
Цитата Сообщение от SergWP Посмотреть сообщение
В исходном коде страницы есть ссылка на файл стилей?
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
/**
 * The Header for our theme.
 *
 * @package WordPress
 * @subpackage YIW Themes
 * @since 1.0
 */             
 global $yiw_mobile;
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 9]>
<html id="ie9" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) | !(IE 9)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php if ( ! $yiw_mobile->isIpad() && yiw_get_option( 'responsive', 1 ) ) : ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<?php endif ?>
<title><?php
    /*
     * Print the <title> tag based on what is being viewed.
     */
    global $page, $paged;
 
    wp_title( '|', true, 'right' );
 
    // Add the blog name.
    bloginfo( 'name' );
    
    // Add description, if is home
    if ( ( is_home() || is_front_page() ) && get_bloginfo( 'description' ) != '' )
        echo ' | ' . get_bloginfo( 'description' );
 
    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
        echo ' | ' . sprintf( __( 'Page %s', 'yiw' ), max( $paged, $page ) );
 
    ?></title>          
    
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />                              
    
    <?php if ( yiw_get_option( 'responsive', 1 ) ) : ?>
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 960px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen960.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 600px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen600.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 480px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen480.css" />
    <?php endif; ?>
    
    <?php
        // styles 
        wp_enqueue_style( 'prettyPhoto',  get_template_directory_uri()."/css/prettyPhoto.css" );  
        wp_enqueue_style( 'tipsy',        get_template_directory_uri()."/core/includes/css/tipsy.css" );
        wp_enqueue_style( 'flexslider',   get_template_directory_uri()."/css/flexslider.css" );  
 
        // scripts    
        wp_enqueue_script( 'jquery-easing' );
        wp_enqueue_script( 'jquery-prettyPhoto' );
        wp_enqueue_script( 'jquery-tipsy' );  
        wp_enqueue_script( 'jquery-tweetable' );           
        wp_enqueue_script( 'jquery-nivo' ); 
        wp_enqueue_script( 'jquery-cycle' );    
        wp_enqueue_script( 'jquery-jcarousel' );
        wp_enqueue_script( 'jquery-mobilemenu', get_template_directory_uri().'/js/jquery.mobilemenu.js', array('jquery') );   
        
        if( yiw_get_option( 'topbar_content' ) == 'twitter' ) {
            wp_enqueue_script( 'jquery-flexislider',        get_template_directory_uri()."/js/jquery.flexslider.min.js" );
        }    
        
        $slider_type = yiw_slider_type();    
 
        if( !in_array( $slider_type, array('none','fixed-image')) ) {
 
                if( !in_array( $slider_type, array('carousel')) )
                    wp_enqueue_style( 'slider-' . $slider_type,        get_template_directory_uri()."/css/slider-". $slider_type .".css" );  
            
                // cycle
                if ( $slider_type == 'cycle' ) {
                    wp_enqueue_script('swfobject');
                    
                } 
                
                // flash
        elseif ( $slider_type == 'flash' ){
                    wp_enqueue_script( 'swfobject' );
                }
                
                // thumbnails
                elseif ( $slider_type == 'thumbnails' ){
                    wp_enqueue_script( 'jquery-aw-showcases', get_template_directory_uri()."/js/jquery.aw-showcase.js" );
                }
                
                //unoslider
                elseif( $slider_type == 'unoslider' ) {    
                    $slider_theme = yiw_get_option( 'slider_' . $slider_type . '_theme' );                                
                    wp_enqueue_style( 'slider-' . $slider_type . '-', get_template_directory_uri()."/css/unoslider-themes/$slider_theme/theme.css" );  
                    wp_enqueue_script( 'unoslider', get_template_directory_uri()."/js/unoslider.js" );
                }   
        
                // elastic
                elseif ( $slider_type == 'elastic' ) {                                                                                       
                    wp_enqueue_style( 'Playfair', 'http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300|Playfair+Display:400italic' ); 
                    wp_enqueue_script( 'jquery-elastic', get_template_directory_uri()."/js/jquery.eislideshow.js", array('jquery'), '1.0' );   
                }                    
        }                             
 
 
        // custom
        wp_enqueue_script( 'jquery-custom',      get_template_directory_uri()."/js/jquery.custom.js", array('jquery'), '1.0', true); 
                                                                                
        if( yiw_get_option( 'font_type' ) == 'cufon' )
        {                      
            wp_enqueue_script('cufon');
            //wp_enqueue_script('cufon-' . $actual_font, get_template_directory_uri()."/fonts/{$actual_font}.font.js");   
        }    
                           
        /* We add some JavaScript to pages with the comment form
         * to support sites with threaded comments (when in use).
         */
        if ( is_singular() && get_option( 'thread_comments' ) )
            wp_enqueue_script( 'comment-reply' );        
                                                                
        $body_class = '';
        if ( ( yiw_get_option( 'responsive', 1 ) && ! $GLOBALS['is_IE'] ) || ( yiw_get_option( 'responsive', 1 ) && yiw_ieversion() >= 9 ) )   
            $body_class = ' responsive';     
                                         
        if ( ! is_user_logged_in() )
            $body_class .= ' not-logged-in'; 
        
        global $post;
        $post_id = isset( $post->ID ) ? $post->ID : 0;
        
        $src = get_post_meta( $post_id, '_map_url', true );
        if ( get_post_meta( $post_id, '_show_map', true ) == 'yes' && ! empty( $src ) ) 
            wp_localize_script( 'jquery-custom', 'header_map', array(
                'tab_open'  => __( 'Open map', 'yiw' ),
                'tab_close' => __( 'Close map', 'yiw' ),
            ) );
        
        
        wp_enqueue_style( 'custom-css', get_template_directory_uri().'/custom.css' );            
    ?>
 
 
    <!-- [favicon] begin -->
    <link rel="shortcut icon" type="image/x-icon" href="<?php yiw_favicon(); ?>" />
    <link rel="icon" type="image/x-icon" href="<?php yiw_favicon(); ?>" />
    <!-- [favicon] end -->  
    
    <?php wp_head() ?>
    <script language=”JavaScript” type=”text/javascript”>
     $(document).ready(function(){
    $(".show").click(function(){
        $("#bg").show();
        $("#"+($(this).attr("box"))).slideDown("fast");
    });
    $(".close").click(function(){
        $("#bg").hide();
        $(".hiddenBlock").slideUp("fast");
        return false; //чтобы не активировалась форма, в которой кнопка закрытия
    })
});</SCRIPT>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/all.css" />
<![endif]-->
</head>
Файл all.css находятся в корне теме?

да

По прямому урлу открывается?

да
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 18:47 8
Во первых, я говорил об исходном коде страницы (на сайте, в браузере), а не коде файла.

Во вторых.. Ну и в какой строке файла вставлен указный выше код?

Цитата Сообщение от tarasow Посмотреть сообщение
Да я хотел для всех версий ie сделать отдельный файл, all.css,
У тебя в этом файле есть код как это делать правильно - 23я строка.
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:01  [ТС] 9
в исходном коде отражается, код был вставлен в 175 строку
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 19:03 10
Цитата Сообщение от SergWP Посмотреть сообщение
У тебя в этом файле есть код как это делать правильно - 23я строка.
Пардон. Там исключение (не увидел сразу).
Вот так в общем надо:
HTML5
1
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:04  [ТС] 11
но даже если я вставляю
PHP
1
2
3
<!--[if !(IE 6) | !(IE 7) | !(IE 8) | !(IE 9)  ]><!-->
<link rel="stylesheet" type="text/css" href="all.css" />
<!--<![endif]-->
то ie всё равно не читает
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 19:04 12
Цитата Сообщение от tarasow Посмотреть сообщение
код был вставлен в 175 строку
Перефразирую. Где там
PHP
1
<?php bloginfo('template_url'); ?>
?
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:06  [ТС] 13
PHP
1
2
3
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" type="text/css" href="all.css" />
<!--<![endif]-->
и такой код он почему то не видит

Добавлено через 48 секунд
Цитата Сообщение от SergWP Посмотреть сообщение
Перефразирую. Где там
PHP
1
<?php bloginfo('template_url'); ?>
?
не совсем понял
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 19:08 14
Цитата Сообщение от tarasow Посмотреть сообщение
то ie всё равно не читает
Найди10 отличий

между
Цитата Сообщение от tarasow Посмотреть сообщение
<link rel="stylesheet" type="text/css" href="all.css" />
и
Цитата Сообщение от SergWP Посмотреть сообщение
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie.css" type="text/css" />
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:15  [ТС] 15
PHP
1
2
3
4
<head>
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/all.css" type="text/css" />
<!--<![endif]-->
не работает
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 19:19 16
Цитата Сообщение от tarasow Посмотреть сообщение
не работает
НЕ ВЕРЮ!
Показывай сайт. Или хотя бы хедер исходного кода страницы.
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:26  [ТС] 17
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php
/**
 * The Header for our theme.
 *
 * @package WordPress
 * @subpackage YIW Themes
 * @since 1.0
 */             
 global $yiw_mobile;
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 9]>
<html id="ie9" <?php language_attributes(); ?>>
<![endif]-->
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" type="text/css" href="all.css" />
<!--<![endif]-->
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/all.css" type="text/css" />
<!--<![endif]-->
<head>
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/all.css" type="text/css" />
<!--<![endif]-->
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php if ( ! $yiw_mobile->isIpad() && yiw_get_option( 'responsive', 1 ) ) : ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<?php endif ?>
<title><?php
    /*
     * Print the <title> tag based on what is being viewed.
     */
    global $page, $paged;
 
    wp_title( '|', true, 'right' );
 
    // Add the blog name.
    bloginfo( 'name' );
    
    // Add description, if is home
    if ( ( is_home() || is_front_page() ) && get_bloginfo( 'description' ) != '' )
        echo ' | ' . get_bloginfo( 'description' );
 
    // Add a page number if necessary:
    if ( $paged >= 2 || $page >= 2 )
        echo ' | ' . sprintf( __( 'Page %s', 'yiw' ), max( $paged, $page ) );
 
    ?></title>          
    
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />                              
    
    <?php if ( yiw_get_option( 'responsive', 1 ) ) : ?>
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 960px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen960.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 600px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen600.css" />
    <link rel="stylesheet" type="text/css" media="screen and (max-width: 480px)" href="<?php echo get_template_directory_uri(); ?>/css/lessthen480.css" />
    <?php endif; ?>
    
    <?php
        // styles 
        wp_enqueue_style( 'prettyPhoto',  get_template_directory_uri()."/css/prettyPhoto.css" );  
        wp_enqueue_style( 'tipsy',        get_template_directory_uri()."/core/includes/css/tipsy.css" );
        wp_enqueue_style( 'flexslider',   get_template_directory_uri()."/css/flexslider.css" );  
 
        // scripts    
        wp_enqueue_script( 'jquery-easing' );
        wp_enqueue_script( 'jquery-prettyPhoto' );
        wp_enqueue_script( 'jquery-tipsy' );  
        wp_enqueue_script( 'jquery-tweetable' );           
        wp_enqueue_script( 'jquery-nivo' ); 
        wp_enqueue_script( 'jquery-cycle' );    
        wp_enqueue_script( 'jquery-jcarousel' );
        wp_enqueue_script( 'jquery-mobilemenu', get_template_directory_uri().'/js/jquery.mobilemenu.js', array('jquery') );   
        
        if( yiw_get_option( 'topbar_content' ) == 'twitter' ) {
            wp_enqueue_script( 'jquery-flexislider',        get_template_directory_uri()."/js/jquery.flexslider.min.js" );
        }    
        
        $slider_type = yiw_slider_type();    
 
        if( !in_array( $slider_type, array('none','fixed-image')) ) {
 
                if( !in_array( $slider_type, array('carousel')) )
                    wp_enqueue_style( 'slider-' . $slider_type,        get_template_directory_uri()."/css/slider-". $slider_type .".css" );  
            
                // cycle
                if ( $slider_type == 'cycle' ) {
                    wp_enqueue_script('swfobject');
                    
                } 
                
                // flash
        elseif ( $slider_type == 'flash' ){
                    wp_enqueue_script( 'swfobject' );
                }
                
                // thumbnails
                elseif ( $slider_type == 'thumbnails' ){
                    wp_enqueue_script( 'jquery-aw-showcases', get_template_directory_uri()."/js/jquery.aw-showcase.js" );
                }
                
                //unoslider
                elseif( $slider_type == 'unoslider' ) {    
                    $slider_theme = yiw_get_option( 'slider_' . $slider_type . '_theme' );                                
                    wp_enqueue_style( 'slider-' . $slider_type . '-', get_template_directory_uri()."/css/unoslider-themes/$slider_theme/theme.css" );  
                    wp_enqueue_script( 'unoslider', get_template_directory_uri()."/js/unoslider.js" );
                }   
        
                // elastic
                elseif ( $slider_type == 'elastic' ) {                                                                                       
                    wp_enqueue_style( 'Playfair', 'http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300|Playfair+Display:400italic' ); 
                    wp_enqueue_script( 'jquery-elastic', get_template_directory_uri()."/js/jquery.eislideshow.js", array('jquery'), '1.0' );   
                }                    
        }                             
 
 
        // custom
        wp_enqueue_script( 'jquery-custom',      get_template_directory_uri()."/js/jquery.custom.js", array('jquery'), '1.0', true); 
                                                                                
        if( yiw_get_option( 'font_type' ) == 'cufon' )
        {                      
            wp_enqueue_script('cufon');
            //wp_enqueue_script('cufon-' . $actual_font, get_template_directory_uri()."/fonts/{$actual_font}.font.js");   
        }    
                           
        /* We add some JavaScript to pages with the comment form
         * to support sites with threaded comments (when in use).
         */
        if ( is_singular() && get_option( 'thread_comments' ) )
            wp_enqueue_script( 'comment-reply' );        
                                                                
        $body_class = '';
        if ( ( yiw_get_option( 'responsive', 1 ) && ! $GLOBALS['is_IE'] ) || ( yiw_get_option( 'responsive', 1 ) && yiw_ieversion() >= 9 ) )   
            $body_class = ' responsive';     
                                         
        if ( ! is_user_logged_in() )
            $body_class .= ' not-logged-in'; 
        
        global $post;
        $post_id = isset( $post->ID ) ? $post->ID : 0;
        
        $src = get_post_meta( $post_id, '_map_url', true );
        if ( get_post_meta( $post_id, '_show_map', true ) == 'yes' && ! empty( $src ) ) 
            wp_localize_script( 'jquery-custom', 'header_map', array(
                'tab_open'  => __( 'Open map', 'yiw' ),
                'tab_close' => __( 'Close map', 'yiw' ),
            ) );
        
        
        wp_enqueue_style( 'custom-css', get_template_directory_uri().'/custom.css' );            
    ?>
 
 
    <!-- [favicon] begin -->
    <link rel="shortcut icon" type="image/x-icon" href="<?php yiw_favicon(); ?>" />
    <link rel="icon" type="image/x-icon" href="<?php yiw_favicon(); ?>" />
    <!-- [favicon] end -->  
    
    <?php wp_head() ?>
    <script language=”JavaScript” type=”text/javascript”>
     $(document).ready(function(){
    $(".show").click(function(){
        $("#bg").show();
        $("#"+($(this).attr("box"))).slideDown("fast");
    });
    $(".close").click(function(){
        $("#bg").hide();
        $(".hiddenBlock").slideUp("fast");
        return false; //чтобы не активировалась форма, в которой кнопка закрытия
    })
});</SCRIPT>
 
</head>
http://tarasow2.tmweb.ru/#

Добавлено через 1 минуту
если хотите в личку могу и фтп скинуть, просто проблема не о чём, а бьюсь с ней уже сутки
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 19:49 18
Жесть.
3 раза попытка вызова стилей для ИЕ:
HTML5
1
2
3
4
5
6
7
8
9
10
11
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" type="text/css" href="all.css" />
<!--<![endif]-->
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" href="http://tarasow2.tmweb.ru/wp-content/themes/mayaall.css" type="text/css" />
<!--<![endif]-->
<head>
<!--[if (IE 6) | (IE 7) | (IE 8) | (IE 9)  ]><!-->
<link rel="stylesheet" href="http://tarasow2.tmweb.ru/wp-content/themes/maya/all.css" type="text/css" />
<!--<![endif]-->
<meta charset="UTF-8" />
Первый раз не от туда.
Второй потерян слеш и потому получился файл "mayaall.css" (и это не соответствует коду файла)
И наконец в третий раз всё ОК. НО!!!
Блин.. ГДЕ хедер начинается??! Стили должны быть ВНУТРИ хедера.


И собсно, all.css от style.css отличается лишь 2мя значениями (ИДшника #nav).


----
Да, по поводу идентификации ИЕ был слегка не прав. Можно использовать <!--[if IE]>
И оператор lte оказывается не ошибка, а такой оператор
---


Короче, вот правильное начало твоего файла (до <title>).

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * The Header for our theme.
 *
 * @package WordPress
 * @subpackage YIW Themes
 * @since 1.0
 */             
 global $yiw_mobile;
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 9]>
<html id="ie9" <?php language_attributes(); ?>>
<![endif]-->
<head>
<!--[if IE ]><!-->
<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/all.css" type="text/css" />
<!--<![endif]-->
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<?php if ( ! $yiw_mobile->isIpad() && yiw_get_option( 'responsive', 1 ) ) : ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<?php endif ?>
0
18 / 18 / 3
Регистрация: 25.01.2013
Сообщений: 330
30.08.2013, 19:58  [ТС] 19
ну вот смотрите, лого это (левая верхняя картинка) <div id="loggo"></div> в style.css это
CSS
1
2
3
4
5
6
7
8
#loggo {
  position: absolute;
  background-image:url(/loggo.png);
   width: 124px;
    height: 95px;
    margin-top:12px;
    left: 88px;
}
а в all.css это
CSS
1
2
3
4
5
6
7
8
 #loggo {
  position: absolute;
  background-image:url(/loggo.png);
   width: 524px;
    height: 950px;
    margin-top:120px;
    left: 500px;
}
но как я вижу в обоих браузерах он отражается одинаково
0
334 / 334 / 57
Регистрация: 24.08.2013
Сообщений: 1,472
30.08.2013, 20:11 20
Цитата Сообщение от tarasow Посмотреть сообщение
#loggo
Этого ИДшника вообще не было. Теперь есть. Да, отличаются.
Почему ты видишь одинаково - это уже вопрос не по ВП. У меня ИЕ нет (я на линуксе), помочь не смогу.

Да, лучше перенеси вызов стилей для ИЕ к основным вызовам стилей. Для порядка (они у тебя ниже тайтла. Который, кстати, не заполнен)
0
30.08.2013, 20:11
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
30.08.2013, 20:11
Помогаю со студенческими работами здесь

Подключение CSS-файла
Есть вот код(часть). И есть отдельно файл css.css. Собсна вопрос,куда и как его подключить,чтобы...

Подключение файла css
Как подключить файл CSS, мой личный, обособленный, чтоб он не зависел от шаблона? Нашёл...

Подключение файла css
Здравствуйте, уважаемые разработчики! У меня вопрос. Как подключить файл стилей css, который...

Подключение файла css
Всем привет! Такой вот простой вопрос. как к проекту mvc 4 подключить свой файлик css. сам файлик...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
20
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru