Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.82/34: Рейтинг темы: голосов - 34, средняя оценка - 4.82
2 / 2 / 0
Регистрация: 02.06.2013
Сообщений: 112
1

Как сделать резиновый фон шапки и резиновый фон меню?

03.06.2013, 02:24. Показов 6921. Ответов 6
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Как сделать резиновый фон шапки и резиновый фон меню?
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
03.06.2013, 02:24
Ответы с готовыми решениями:

Как сделать резиновый фон ?
добрый день! как сделать резиновый фон, он у меня не растягивается, вместе с контентом ...

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

Как сделать резиновый фон(в Dreamweaver CS4)
Не могу сделать Фон что бы она растягивалась вместе с (браузером), как это сделать?

Как сделать фон под шапкой Резиновый сайт
Вот в общем такая ситуация, сверстал сайт резиновый, шапка находиться по центру в формате jpeg, и...

6
2 / 2 / 0
Регистрация: 02.06.2013
Сообщений: 112
03.06.2013, 02:47  [ТС] 2
Вот так хочу сделать
Миниатюры
Как сделать резиновый фон шапки и резиновый фон меню?   Как сделать резиновый фон шапки и резиновый фон меню?  
0
Администратор
12268 / 5333 / 268
Регистрация: 05.04.2011
Сообщений: 14,086
Записей в блоге: 2
03.06.2013, 11:02 3
SavchenkoArt, код страницы давайте - html и css
0
2 / 2 / 0
Регистрация: 02.06.2013
Сообщений: 112
03.06.2013, 13:09  [ТС] 4
Сделано)
Вложения
Тип файла: zip html и css.zip (3.0 Кб, 98 просмотров)
0
2 / 2 / 0
Регистрация: 02.06.2013
Сообщений: 112
05.06.2013, 02:04  [ТС] 5
Так кто-то может помочь? Или это очень сложно?) так я не буду заморачиваться..

Добавлено через 6 минут
index.php
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
<?php
/**
 * J!Blank Template for Joomla by Joomla-book.ru
 * @category   JBlank
 * @author     smet.denis <admin@joomla-book.ru>
 * @copyright  Copyright (c) 2009-2012, Joomla-book.ru
 * @license    GNU GPL
 * @link       http://joomla-book.ru/projects/jblank JBlank project page
 */
defined('_JEXEC') or die('Restricted access');
 
require_once(dirname(__FILE__) . '/php/_code.php');
 
?><!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7 ie6" lang="<?php echo $tpl->lang;?>"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="<?php echo $tpl->lang;?>"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="<?php echo $tpl->lang;?>"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="<?php echo $tpl->lang;?>"> <!--<![endif]-->
<head>
    <jdoc:include type="head" />
</head>
<body>
 
    <div class="container_12">
 
        <div class="grid_6"><jdoc:include type="modules" name="logo" /></div>
        <div class="grid_6 content"><jdoc:include type="modules" name="top-block" /></div>
        <div class="clear"></div>
 
        <?php if ($this->countModules('top')) : ?>
            <div class="grid_12 content"><jdoc:include type="modules" name="top" /></div>
            <div class="clear"></div>
        <?php endif; ?>
 
 
        <?php if ($this->countModules('header')) : ?>
            <div class="modules-header content">
                <jdoc:include type="modules" name="header" style="grid" countModules="<?=$this->countModules('header');?>" />
                <div class="clear"></div>
            </div>
        <?php endif; ?>
 
 
        <?php if ($this->countModules('mainmenu')) : ?>
            <div class="grid_12 mainmenu">
                <jdoc:include type="modules" name="mainmenu" />
            </div>
            <div class="clear"></div>
        <?php endif;?>
 
 
        <?php if (!$tpl->isFront && $this->countModules('breadcrumbs')) : ?>
            <div class="grid_12 content" id="breadcrumbs">
                <jdoc:include type="modules" name="breadcrumbs" />
            </div>
            <div class="clear"></div>
        <?php endif;?>
 
 
        <div class="grid_<?=$tpl->positionData['left'];?> content">
            <jdoc:include type="modules" name="left" style="header" />
        </div>
        <div class="grid_<?=$tpl->positionData['component'];?>">
            <?php if ($tpl->isError) : ?>
                <div id="joomla-message"><jdoc:include type="message" /></div>
            <?php endif; ?>
            &nbsp;
            <div class="component content">
                <jdoc:include type="modules" name="pre_component" />
                <jdoc:include type="component" />
                <jdoc:include type="modules" name="post_component" />
            </div>
        </div>
        <div class="grid_<?=$tpl->positionData['right'];?> content">
            <jdoc:include type="modules" name="right" style="header" />
        </div>
        <div class="clear"></div>
 
 
        <?php if ($this->countModules('bottom')) : ?>
            <div class="modules-bottom content">
                <jdoc:include type="modules" name="bottom" style="grid" countModules="<?=$this->countModules('bottom');?>" />
                <div class="clear"></div>
            </div>
        <?php endif; ?>
 
 
        <?php
        if ($this->countModules('footer-2-1')
                && $this->countModules('footer-2-2')
                && $this->countModules('footer-2-3')
        ) : ?>
            <div class="modules-footer-2 content grid_3">
                <jdoc:include type="modules" name="footer-2-1" style="header" />
            </div>
            <div class="modules-footer-2 content grid_3">
                <jdoc:include type="modules" name="footer-2-2" style="header" />
            </div>
            <div class="modules-footer-2 content grid_6">
                <jdoc:include type="modules" name="footer-2-3" style="header" />
            </div>
            <div class="clear"></div>
        <?php endif; ?>
 
 
        <?php if ($this->countModules('footer')) : ?>
            <div class="modules-footer content grid_12">
                <jdoc:include type="modules" name="footer" style="header" />
            </div>
            <div class="clear"></div>
        <?php endif; ?>
 
 
        <div class="content grid_12">
            <!-- remove me! -->
            <div class="copyrights"></div>
        </div>
 
    </div>
 
    <?php echo $tpl->renderJS(); ?>
 
    <?php if ($this->countModules('counters')) : ?>
        <div style="display: none;"><jdoc:include type="modules" name="counters" /></div>
    <?php endif; ?>
 
</body>
</html>
Добавлено через 1 минуту
grid.css
CSS
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
/**
 * J!Blank Template for Joomla by Joomla-book.ru
 * @category   JBlank
 * @author     smet.denis <admin@joomla-book.ru>
 * @copyright  Copyright (c) 2009-2012, Joomla-book.ru
 * @license    GNU GPL
 * @link       [url]http://joomla-book.ru/projects/jblank[/url] JBlank project page
 */
 
body{min-width:960px;}
.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px;}
.grid_0 {display: none;}
.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px;}
.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative;}
.container_12 .grid_3,.container_16 .grid_4{width:220px;}
.container_12 .grid_6,.container_16 .grid_8{width:460px;}
.container_12 .grid_9,.container_16 .grid_12{width:700px;}
.container_12 .grid_12,.container_16 .grid_16{width:960px;}
.alpha{margin-left:0;}
.omega{margin-right:0;}
.container_12 .grid_1{width:60px;}
.container_12 .grid_2{width:140px;}
.container_12 .grid_4{width:300px;}
.container_12 .grid_5{width:380px;}
.container_12 .grid_7{width:540px;}
.container_12 .grid_8{width:620px;}
.container_12 .grid_10{width:780px;}
.container_12 .grid_11{width:860px;}
.container_16 .grid_1{width:40px;}
.container_16 .grid_2{width:100px;}
.container_16 .grid_3{width:160px;}
.container_16 .grid_5{width:280px;}
.container_16 .grid_6{width:340px;}
.container_16 .grid_7{width:400px;}
.container_16 .grid_9{width:520px;}
.container_16 .grid_10{width:580px;}
.container_16 .grid_11{width:640px;}
.container_16 .grid_13{width:760px;}
.container_16 .grid_14{width:820px;}
.container_16 .grid_15{width:880px;}
.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px;}
.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px;}
.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px;}
.container_12 .prefix_1{padding-left:80px;}
.container_12 .prefix_2{padding-left:160px;}
.container_12 .prefix_4{padding-left:320px;}
.container_12 .prefix_5{padding-left:400px;}
.container_12 .prefix_7{padding-left:560px;}
.container_12 .prefix_8{padding-left:640px;}
.container_12 .prefix_10{padding-left:800px;}
.container_12 .prefix_11{padding-left:880px;}
.container_16 .prefix_1{padding-left:60px;}
.container_16 .prefix_2{padding-left:120px;}
.container_16 .prefix_3{padding-left:180px;}
.container_16 .prefix_5{padding-left:300px;}
.container_16 .prefix_6{padding-left:360px;}
.container_16 .prefix_7{padding-left:420px;}
.container_16 .prefix_9{padding-left:540px;}
.container_16 .prefix_10{padding-left:600px;}
.container_16 .prefix_11{padding-left:660px;}
.container_16 .prefix_13{padding-left:780px;}
.container_16 .prefix_14{padding-left:840px;}
.container_16 .prefix_15{padding-left:900px;}
.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px;}
.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px;}
.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px;}
.container_12 .suffix_1{padding-right:80px;}
.container_12 .suffix_2{padding-right:160px;}
.container_12 .suffix_4{padding-right:320px;}
.container_12 .suffix_5{padding-right:400px;}
.container_12 .suffix_7{padding-right:560px;}
.container_12 .suffix_8{padding-right:640px;}
.container_12 .suffix_10{padding-right:800px;}
.container_12 .suffix_11{padding-right:880px;}
.container_16 .suffix_1{padding-right:60px;}
.container_16 .suffix_2{padding-right:120px;}
.container_16 .suffix_3{padding-right:180px;}
.container_16 .suffix_5{padding-right:300px;}
.container_16 .suffix_6{padding-right:360px;}
.container_16 .suffix_7{padding-right:420px;}
.container_16 .suffix_9{padding-right:540px;}
.container_16 .suffix_10{padding-right:600px;}
.container_16 .suffix_11{padding-right:660px;}
.container_16 .suffix_13{padding-right:780px;}
.container_16 .suffix_14{padding-right:840px;}
.container_16 .suffix_15{padding-right:900px;}
.container_12 .push_3,.container_16 .push_4{left:240px;}
.container_12 .push_6,.container_16 .push_8{left:480px;}
.container_12 .push_9,.container_16 .push_12{left:720px;}
.container_12 .push_1{left:80px;}
.container_12 .push_2{left:160px;}
.container_12 .push_4{left:320px;}
.container_12 .push_5{left:400px;}
.container_12 .push_7{left:560px;}
.container_12 .push_8{left:640px;}
.container_12 .push_10{left:800px;}
.container_12 .push_11{left:880px;}
.container_16 .push_1{left:60px;}
.container_16 .push_2{left:120px;}
.container_16 .push_3{left:180px;}
.container_16 .push_5{left:300px;}
.container_16 .push_6{left:360px;}
.container_16 .push_7{left:420px;}
.container_16 .push_9{left:540px;}
.container_16 .push_10{left:600px;}
.container_16 .push_11{left:660px;}
.container_16 .push_13{left:780px;}
.container_16 .push_14{left:840px;}
.container_16 .push_15{left:900px;}
.container_12 .pull_3,.container_16 .pull_4{left:-240px;}
.container_12 .pull_6,.container_16 .pull_8{left:-480px;}
.container_12 .pull_9,.container_16 .pull_12{left:-720px;}
.container_12 .pull_1{left:-80px;}
.container_12 .pull_2{left:-160px;}
.container_12 .pull_4{left:-320px;}
.container_12 .pull_5{left:-400px;}
.container_12 .pull_7{left:-560px;}
.container_12 .pull_8{left:-640px;}
.container_12 .pull_10{left:-800px;}
.container_12 .pull_11{left:-880px;}
.container_16 .pull_1{left:-60px;}
.container_16 .pull_2{left:-120px;}
.container_16 .pull_3{left:-180px;}
.container_16 .pull_5{left:-300px;}
.container_16 .pull_6{left:-360px;}
.container_16 .pull_7{left:-420px;}
.container_16 .pull_9{left:-540px;}
.container_16 .pull_10{left:-600px;}
.container_16 .pull_11{left:-660px;}
.container_16 .pull_13{left:-780px;}
.container_16 .pull_14{left:-840px;}
.container_16 .pull_15{left:-900px;}
.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}
.clearfix:before,.clearfix:after,.container_12:before,.container_12:after,.container_16:before,.container_16:after{content:'.';display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0;}
.clearfix:after,.container_12:after,.container_16:after{clear:both;}
.clearfix,.container_12,.container_16{zoom:1;}
Добавлено через 59 секунд
_styles.css
CSS
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
/* .mainmenu .menuexample */
.mainmenu {margin: 0em 0;}
.mainmenu .menu { min-height: 2.5em; line-height: 2.5em; border: 1px solid #ccc; }
.mainmenu .menu li { float: left; display: block; position: relative; list-style: none; border-right: 1px solid #ccc; }
.mainmenu .menu li:last-child { border-right: none; }
.mainmenu .menu a { text-decoration: none; padding: 0 1em; display: block; }
.mainmenu .menu ul { display: none; position: absolute; top: 2.5em; left: -1px; min-width: 160px; background: #fff; border: none; }
.mainmenu .menu ul ul { left: 100%; top: -1px; }
.mainmenu .menu li.parent li { float: none; border: 1px solid #ccc; border-top: none; }
.mainmenu .menu li:hover { background: #ccc; }
.mainmenu .menu a:hover { color: #fff; }
.mainmenu .menu li:hover ul ul,
.mainmenu .menu li:hover ul li:hover ul ul { display: none; }
.mainmenu .menu li:hover ul,
.mainmenu .menu li:hover ul li:hover ul,
.mainmenu .menu li:hover ul li:hover ul li:hover ul { display: block; }
 
.modules-header  {
background-color: #114989;
}
 
.body {
padding: 0;
margin: 0;}
 
.container_12
{
 
 
}
 
.grid_6
{margin-top: 5px;}
 
.grid_3
{margin-top: 10px}
 
.mainmenu
{
background-color: #329a1c;
}
 
a {
    color: #fff;
0
9 / 9 / 4
Регистрация: 11.05.2013
Сообщений: 110
05.06.2013, 11:23 6
Резина - это отсутствие указания ширины/высоты или указание данных габаритов в процентном соотношении а не в пикселях.

Как-то так:
CSS
1
.image {width: 100%;min-width:400px;background-image: url('image.jpg');}
1
2 / 2 / 0
Регистрация: 02.06.2013
Сообщений: 112
05.06.2013, 12:23  [ТС] 7
Весь контент сдвинулся в левую сторону, как его можно выровнять по центру
0
05.06.2013, 12:23
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
05.06.2013, 12:23
Помогаю со студенческими работами здесь

Резиновый фон
У меня фоновая картинка немного обрезается в полном окне. но резинится при разной ширине окна. Если...

Резиновый фон
Всем привет) Есть макет, в середине книга в которой находится контент. Ширина фиксированная. Для...

Резиновый фон
Как быть с картинкой с разрешением 1536x896 если она открывается на экране с разрешением 1366x768...

Резиновый фон!?!?
Подскажите каким образом создается резиновый фон страницы, размер изображения 1600x900px , пробовал...


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

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