 Groupe : Membres
|
Bonjour !
Je commence donc un site mélangé avec Connectix-board.
En fait, dans les pages du forum, je me suis arrangé pour que celui-ci inclut aussi le menu du site etc.
Au premier menu, tout a fonctionné.
Au 2ème et aux 3ème, un soucis : le forum se décale
Voyez plutôt:
http://enguerran.e3b.org/forum/
La page forum où j'inclus:
Code : 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 | <?php if (!defined('CB_TEMPLATE')) exit('Incorrect access attempt !!'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title><?php echo $g_pagename; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo $g_csslink; ?>
<?php echo $g_rsslink; ?>
<link rel="stylesheet" media="screen" type="text/css" href="css.css"/>
<script type="text/javascript" src="include/javascripts/cb_base.js"></script>
<script type="text/javascript" src="include/javascripts/cb_bbcode.js"></script>
<script type="text/javascript" src="include/javascripts/cb_ajax.js"></script>
</head>
<body>
<?php include('includes/menu_horizontal.php'); ?>
<?php include('includes/menu_gauche.php'); ?>
<?php include('includes/menu_gauche3.php'); ?>
<?php include('includes/menu_gauche2.php'); ?>
<div id="template">
<div id="main" >
<h1 id="header">
<a href="<?php echo manage_url('index.php', 'forum.html'); ?>" id="headerlink"><span><?php echo $g_forumname; ?></span></a>
</h1>
<?php require($template_path.'gen_contents.php'); ?>
</div>
</div>
<div id="footer">
<?php include('includes/copyright.php'); ?>
</div>
</body>
</html>
|
Le code des menus:
Code : PHP 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 | <div id="gauche">
<div class="titre_menu"><h2><center>Ecologie</center></h2></div>
<ul>
<li><a href="vehicules.php">Véhicules à moteur</a></li>
<li><a href="production.php">Production d'énergie</a></li>
<li><a href="industrie.php">Industrie</a></li>
<li><a href="pollution_marine.php">Pollution marine</a></li>
<li><a href="biocarburants.php">Biocarburants</a></li>
</ul>
<br />
<div class="titre_menu"><h2><center>Fiches pratiques</center></h2></div>
<ul>
<li><a href="eau.php">Economiser l'eau</a></li>
<li><a href="bio.php">Manger bio</a></li>
<li><a href="trie.php">Trier ses déchets</a></li>
</ul>
</div>
|
Code : 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 | <div id="gauche3">
<div class="titre_menu"><h2><center>Forums</center></h2></div>
<ul>
<li><a href="http://enguerran.e3b.org/forum/">Forums</a></li>
<li><a href="http://enguerran.e3b.org/forum/<?php echo manage_url('index.php?act=members', 'forum-members.html'); ?>" id="hm_members">Membres</a></li>
<li><a href="http://enguerran.e3b.org/forum/<?php echo manage_url('index.php?act=cu', 'forum-connected.html'); ?>" id="hm_connected"><?php
$reponse = mysql_query('SELECT con_id FROM forumconnected');
$connecte = mysql_num_rows($reponse);
?>Connectés(<?php echo $connecte; ?>)</a></li>
<li><a href="<?php echo manage_url('index.php?act=src', 'forum-search.html'); ?>" id="hm_search">Rechercher</a></li>
<?php
if ($_SESSION['cb_user']->logged)
{
$GLOBALS['cb_tpl']->assign(array(
'g_user_id' => $_SESSION['cb_user']->userid,
'g_user_name' => $_SESSION['cb_user']->username,
'g_user_link' => '<a href="'.manage_url('index.php?act=user&showprofile='.$_SESSION['cb_user']->userid,'forum-m'.$_SESSION['cb_user']->userid.','.rewrite_words($_SESSION['cb_user']->username).'.html').'">'.$_SESSION['cb_user']->username.'</a>',
'g_user_admin' => $_SESSION['cb_user']->isAdmin(),
'g_user_mod' => $_SESSION['cb_user']->isModerator(),
'g_newmessages' => $_SESSION['cb_user']->nbmp
));
}
else $GLOBALS['cb_tpl']->assign('g_suspendregister',($GLOBALS['cb_cfg']->config['suspend_register']=='yes'));
if ($g_user_admin)
{
?>
<li><a href="<?php echo manage_url('admin.php', 'forum-admin.html'); ?>" id="hm_admin">Administration</a></li>
<?php
}
else
{
}
?>
</ul>
</div>
|
Code : 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 | <?php if ($_SESSION['cb_user']->logged) {
$GLOBALS['cb_tpl']->assign(array(
'g_user_id' => $_SESSION['cb_user']->userid,
'g_user_name' => $_SESSION['cb_user']->username,
'g_user_link' => '<a href="'.manage_url('index.php?act=user&showprofile='.$_SESSION['cb_user']->userid,'forum-m'.$_SESSION['cb_user']->userid.','.rewrite_words($_SESSION['cb_user']->username).'.html').'">'.$_SESSION['cb_user']->username.'</a>',
'g_user_admin' => $_SESSION['cb_user']->isAdmin(),
'g_user_mod' => $_SESSION['cb_user']->isModerator(),
'g_newmessages' => $_SESSION['cb_user']->nbmp
));
}
else $GLOBALS['cb_tpl']->assign('g_suspendregister',($GLOBALS['cb_cfg']->config['suspend_register']=='yes'));
?>
<?php
if ($g_islogged)
{
?>
<div id="gauche2">
<div class="titre_menu"><h2><center>Espace perso</center></h2></div>
<ul>
<li><a href="http://enguerran.e3b.org/forum/<?php echo manage_url('index.php?act=mp', 'forum-mp.php') ?>">Messages personnels</a></li>
<li><a href="options.php">Mes options</a></li>
<li><a href="<?php echo manage_url('index.php?act=user&editprofile='.$g_user_id, 'forum-profile'.$g_user_id.'.html'); ?>" id="cp_profile">Profil</a></li>
</ul>
</div>
<?php
}
else
{
}
?>
|
Et enfin, le css de ceux-ci:
Code : 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 | #gauche{
background-image:url("pic/menu5.jpg");
float:left;
margin-left:20px;
margin-top:20px;
width: 20%;
}
#gauche li
{
list-style: none;
background: url("pic/li.png") left center no-repeat;
padding-left: 20px;
margin-left: -40px;
}
#gauche2
{
background-image:url("pic/menu5.jpg");
float:left;
clear:left;
margin-left:20px;
width: 18%;
}
#gauche2 li
{
list-style: none;
background: url("pic/li.png") left center no-repeat;
padding-left: 20px;
margin-left: -40px;
}
#gauche3
{
background-image:url("pic/menu5.jpg");
float:left;
clear:left;
margin-left:20px;
width: 18%;
}
#gauche3 li
{
list-style: none;
background: url("pic/li.png") left center no-repeat;
padding-left: 20px;
margin-left: -40px;
}
|
+ celui du forum:
Code : CSS1
2
3
4
5
6
7
8
9 | #template
{
padding:0 0 0 25px;
margin-right: 30px;
float: right;
background-color: #a0cf0d;
width: 72%;
margin-bottom: 40px;
}
|
Vous pourriez me dire la raison de ce décalage ?
Merci pour votre aide !
PS: 1)Le code PHP marche niquel. 2)Ne me parlez pas du design pourri
Enguerran
|
Meuh !
 Groupe : Membres
|
Pourquoi ne pas mettre tous les menus dans un grand block qui les positionne?
Comme ça le grand block positionne tout et si tu veux retoucher les margin et autres, tu le fais une seule fois.
Et les "petits menus" eux se positionnent tout seul dans le grand.
Édité
le 22/06/2008 à 11:20:42
par viki53
|
 Groupe : Membres
|
J'y avais déjà pensé et j'avais essayé mais ça n'avait rien changé.
Je l'ai fait là, et regarde: http://enguerran.e3b.org/forum/
Mon CSS:
Code : 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 | body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
margin: 0;
padding: 0;
color:black;
background-color:#a0cf0d;
}
a
{
color: black;
}
a:visited
{
color: black;
}
a:hover
{
color: orange;
}
#gauche
{
background-image:url("pic/menu5.jpg");
float:left;
margin-left:58px;
margin-top:20px;
width: 144px;
clear: left;
}
#gauche li
{
list-style: none;
background: url("pic/li.png") left center no-repeat;
padding-left: 20px;
margin-left: -40px;
}
#menu_horizontal
{
background-image:url("pic/menuh.jpg");
margin-right:20px;
margin-left:120px;
background-position: center;
}
#menu_horizontal li
{
display: inline;
}
#menu_horizontal li a
{
float: left;
color: gray;
font-weight: bold;
padding: 2px 6px 4px 6px;
text-decoration: none;
font-size:12px;
}
#menu_horizontal li a:hover
{
color: black;
border-bottom: 4px solid red;
padding-bottom: 0;
}
.titre_menu h1
{
background: none;
font-size:20px;
color: black;
}
.titre_menu h2
{
font-size:16px;
background: none;
color: black;
}
#footer
{
width:80%;
margin-left: 60px;
height:100px;
text-align:center;
clear:both;
background-color:#518208;
}
#conteneur{
width:100%;
background-image:url("pic/corps.jpg");
min-height:800px;
position:relative;
margin:auto;
}
#header2{
width:100%;
height:130px;
background-image:url("pic/header.jpg");
background-repeat: no-repeat;
background-position: center;
}
|

|
Je suis l'ombre de moi même !
 Groupe : Bannis
|
Essaie de remplacer ce code : Code : 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 | <?php if (!defined('CB_TEMPLATE')) exit('Incorrect access attempt !!'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title><?php echo $g_pagename; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo $g_csslink; ?>
<?php echo $g_rsslink; ?>
<link rel="stylesheet" media="screen" type="text/css" href="css.css"/>
<script type="text/javascript" src="include/javascripts/cb_base.js"></script>
<script type="text/javascript" src="include/javascripts/cb_bbcode.js"></script>
<script type="text/javascript" src="include/javascripts/cb_ajax.js"></script>
</head>
<body>
<?php include('includes/menu_horizontal.php'); ?>
<?php include('includes/menu_gauche.php'); ?>
<?php include('includes/menu_gauche3.php'); ?>
<?php include('includes/menu_gauche2.php'); ?>
<div id="template">
<div id="main" >
<h1 id="header">
<a href="<?php echo manage_url('index.php', 'forum.html'); ?>" id="headerlink"><span><?php echo $g_forumname; ?></span></a>
</h1>
<?php require($template_path.'gen_contents.php'); ?>
</div>
</div>
<div id="footer">
<?php include('includes/copyright.php'); ?>
</div>
</body>
</html>
|
par : Code : 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 | <?php if (!defined('CB_TEMPLATE')) exit('Incorrect access attempt !!'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title><?php echo $g_pagename; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo $g_csslink; ?>
<?php echo $g_rsslink; ?>
<link rel="stylesheet" media="screen" type="text/css" href="css.css"/>
<script type="text/javascript" src="include/javascripts/cb_base.js"></script>
<script type="text/javascript" src="include/javascripts/cb_bbcode.js"></script>
<script type="text/javascript" src="include/javascripts/cb_ajax.js"></script>
</head>
<body>
<div id="conteneur">
<div id="header">
</div>
<?php
include("menu_horizontal.php");
?>
<?php
include("menu_gauche.php");
?>
<div id="centre">
<div id="template">
<div id="main" >
<h1 id="header">
<a href="<?php echo manage_url('index.php', 'forum.html'); ?>" id="headerlink"><span><?php echo $g_forumname; ?></span></a>
</h1>
<?php require($template_path.'gen_contents.php'); ?>
</div>
</div>
</div>
<?php
include("menu_droit.php");
?>
<?php
include("copyright.php");
?>
</body>
</html>
|
Édité
le 22/06/2008 à 14:51:28
par Michacke
Bannis sous demande. Supression => trop délicat alors, j'ai été bannis avec mon consentement  .
|
 Groupe : Membres
|
Oups j'avais pas mis mon code à jour:
Code : 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 | <?php if (!defined('CB_TEMPLATE')) exit('Incorrect access attempt !!'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title><?php echo $g_pagename; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<?php echo $g_csslink; ?>
<?php echo $g_rsslink; ?>
<link rel="stylesheet" media="screen" type="text/css" href="css.css"/>
<script type="text/javascript" src="include/javascripts/cb_base.js"></script>
<script type="text/javascript" src="include/javascripts/cb_bbcode.js"></script>
<script type="text/javascript" src="include/javascripts/cb_ajax.js"></script>
</head>
<body>
<div id="conteneur">
<div id="header2">
</div>
<?php
include("includes/menu_horizontal.php");
?>
<?php
include("includes/menu_gauche.php");
?>
<div id="centre">
<div id="template">
<div id="main" >
<h1 id="header">
<a href="<?php echo manage_url('index.php', 'forum.html'); ?>" id="headerlink"><span><?php echo $g_forumname; ?></span></a>
</h1>
<?php require($template_path.'gen_contents.php'); ?>
</div>
</div>
</div>
<?php
include("includes/copyright.php");
?>
</body>
</html>
|
Code : 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 | body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
margin: 0;
padding: 0;
color:black;
background-color:#a0cf0d;
}
a
{
color: black;
}
a:visited
{
color: black;
}
a:hover
{
color: orange;
}
#gauche
{
background-image:url("pic/menu5.jpg");
float:left;
margin-left:25px;
margin-top:20px;
width: 144px;
clear: left;
}
#gauche li
{
list-style: none;
background: url("pic/li.png") left center no-repeat;
padding-left: 20px;
margin-left: -40px;
}
#menu_horizontal
{
background-image:url("pic/menuh.jpg");
margin-right:20px;
margin-left:51px;
background-color: none;
width:771px;
height:40px;
background-position: center;
}
#menu_horizontal li
{
display: inline;
}
#menu_horizontal li a
{
float: left;
color: gray;
font-weight: bold;
padding: 2px 6px 4px 6px;
text-decoration: none;
font-size:12px;
}
#menu_horizontal li a:hover
{
color: black;
border-bottom: 4px solid red;
padding-bottom: 0;
}
#menu_horizontal table
{
background:none;
border-collapse:collapse;
border:none;
}
#menu_horizontal td
{
border: none;
text-align: center;
}
.titre_menu h1
{
background: none;
font-size:20px;
color: black;
}
.titre_menu h2
{
font-size:16px;
background: none;
color: black;
}
#footer
{
width:80%;
margin-left: 85px;
text-align:center;
clear:both;
background-color:#518208;
}
#conteneur
{
width: 890px;
background-image:url("pic/corps.jpg");
min-height:800px;
position:relative;
margin:auto;
}
#header2
{
width:100%;
height:130px;
background-image:url("pic/header.jpg");
background-repeat: no-repeat;
background-position: center;
}
|
Voilà, d'ailleurs je me demande si ce que tu viens de me proposer c'est pas ce que j'avais déjà.
Toujours le même problème
|
Je suis l'ombre de moi même !
 Groupe : Bannis
|
Up.
Bannis sous demande. Supression => trop délicat alors, j'ai été bannis avec mon consentement  .
|