Jump to content
MakeWebGames

Recommended Posts

Posted

Posting again after 9 minutes because someone didn't post isn't going to help >.<.

Align the images to the center?

Posted
Posting again after 9 minutes because someone didn't post isn't going to help >.<.

Align the images to the center?

Nailed it on the head.

I don't know if its an alignment because the bottom section seems to be aligned fine. This is assuming that its the same classes and ids. Possibly a failed open/close div tag?

Posted (edited)

they are all in centre. could you edit my code for me and make it right?

here's the code..

 

<style>
white {
   color: white;
   text-shadow: 0px 0px 2px maroon;
}
.mm-li-info {
   background: url("mmimg.jpg") no-repeat scroll left top transparent;
   color: #BBBBBB;
   display: block;
   font-family: Arial;
   font-size: 12px;
   font-weight: bolder;
   padding: 8px 0 4px 6px;
   text-align: center;
   text-shadow: 0 0 2px red;
}
.mm-li-info:hover {
   background: url("info.jpg") repeat scroll 0 0 transparent;
   opacity: 0.50;
}
.mm-li-infoE {
   background: url("mmimg.jpg") no-repeat scroll left top transparent;
   color: #BBBBBB;
   display: block;
   font-family: Arial;
   font-size: 12px;
   font-weight: bolder;
   padding: 8px 0 4px 6px;
   text-align: center;
   text-shadow: 0 0 2px red;
}
.mm-li-infobgred {
   background: red;
   display: block;
}
.mm-li-infobgblue {
   background: darkblue;
   display: block;
}
.mm-li-infoE:hover {
   background: url("info.jpg");
   opacity: 0.80;
}
</style>
<?php
global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
echo'<center>
<img src="mmtop.png">
<a href="index.php"><span class="mm-li-info">Home</span></a>
<a href="inventory.php"><span class="mm-li-info">Inventory</span></a>';
if ($ec == 0) {
echo'<a href="events.php"><span class="mm-li-info">Events</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="events.php"><span class="mm-li-infoE">New Events ('.$ec.')</span></span></a>';
}
if ($mc == 0) {
echo'<a href="mailbox.php"><span class="mm-li-info">Mailbox</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="mailbox.php"><span class="mm-li-infoE">New Mail ('.$mc.')</span></span></a>';
}
echo'<a href="explore.php"><span class="mm-li-info">Explore</span></a>
<img src="mmbottom.png"><hr />
<img src="mmtop.png">
<a href="gym.php"><span class="mm-li-info">Gym</span></a>
<a href="crimes.php"><span class="mm-li-info">Crimes</span></a>
<a href="job.php"><span class="mm-li-info">Job</span></a>
<a href="education.php"><span class="mm-li-info">School</span></a>';
if ($hc == 0) {
echo'<a href="hospital.php"><span class="mm-li-info">Hospital</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="hospital.php"><span class="mm-li-infoE">Hospital('.$hc.')</span></span></a>';
}
echo'<img src="mmbottom.png">
<hr /><img src="mmtop.png">';
if ($jc == 0) {
echo'<a href="wmanager.php"><span class="mm-li-info">Weather Manager</span></a>';
}
else {
echo'<span class="mm-li-infobgblue"><a href="jail.php"><span class="mm-li-infoE">Jail ('.$jc.')</span></span></a>';
}
echo'<a href="new_staff.php"><span class="mm-li-info">Staff Panel</span></a>
<a href="announcement.php"><span class="mm-li-info">Announcement</span></a>
<a href="search.php"><span class="mm-li-info">Search</span></a>
<a href="newspaper.php"><span class="mm-li-info">Newspaper</span></a>';
if ($ir['gang'] !=0) {
echo'<a href="gang.php"><span class="mm-li-info">My Gang</span></a>';
}
echo'<img src="mmbottom.png">
</center><hr />
';
echo'<img src="mmtop.png"><a href="preferences.php"><span class="mm-li-info">Preferences</span></a>
<a href="preport.php"><span class="mm-li-info">Player Report</span></a>
<a href="gamerules.php"><span class="mm-li-info">Game Rules</span></a>
<a href="viewuser.php?u='.$ir['userid'].'"><span class="mm-li-info">My Profile</span></a>
<a href="logout.php"><span class="mm-li-info">Log Out</span></a>
<img src="mmbottom.png">';
print "<hr />The Time Is:";
echo date ('<font color=Red>F j, Y</font>')."".date('<font color=white>g:i:s a</font>');
echo'</white>';
?>
Edited by KyleMassacre
added code tags
Posted
they are all in centre. could you edit my code for me and make it right?

here's the code..

 

<style>
white {
   color: white;
   text-shadow: 0px 0px 2px maroon;
}
.mm-li-info {
   background: url("mmimg.jpg") no-repeat scroll left top transparent;
   color: #BBBBBB;
   display: block;
   font-family: Arial;
   font-size: 12px;
   font-weight: bolder;
   padding: 8px 0 4px 6px;
   text-align: center;
   text-shadow: 0 0 2px red;
}
.mm-li-info:hover {
   background: url("info.jpg") repeat scroll 0 0 transparent;
   opacity: 0.50;
}
.mm-li-infoE {
   background: url("mmimg.jpg") no-repeat scroll left top transparent;
   color: #BBBBBB;
   display: block;
   font-family: Arial;
   font-size: 12px;
   font-weight: bolder;
   padding: 8px 0 4px 6px;
   text-align: center;
   text-shadow: 0 0 2px red;
}
.mm-li-infobgred {
   background: red;
   display: block;
}
.mm-li-infobgblue {
   background: darkblue;
   display: block;
}
.mm-li-infoE:hover {
   background: url("info.jpg");
   opacity: 0.80;
}
</style>
<?php
global $db,$c,$ir, $set;
$hc=$set['hospital_count'];
$jc=$set['jail_count'];
$ec=$ir['new_events'];
$mc=$ir['new_mail'];
echo'<center>
<img src="mmtop.png">
<a href="index.php"><span class="mm-li-info">Home</span></a>
<a href="inventory.php"><span class="mm-li-info">Inventory</span></a>';
if ($ec == 0) {
echo'<a href="events.php"><span class="mm-li-info">Events</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="events.php"><span class="mm-li-infoE">New Events ('.$ec.')</span></span></a>';
}
if ($mc == 0) {
echo'<a href="mailbox.php"><span class="mm-li-info">Mailbox</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="mailbox.php"><span class="mm-li-infoE">New Mail ('.$mc.')</span></span></a>';
}
echo'<a href="explore.php"><span class="mm-li-info">Explore</span></a>
<img src="mmbottom.png"><hr />
<img src="mmtop.png">
<a href="gym.php"><span class="mm-li-info">Gym</span></a>
<a href="crimes.php"><span class="mm-li-info">Crimes</span></a>
<a href="job.php"><span class="mm-li-info">Job</span></a>
<a href="education.php"><span class="mm-li-info">School</span></a>';
if ($hc == 0) {
echo'<a href="hospital.php"><span class="mm-li-info">Hospital</span></a>';
}
else {
echo'<span class="mm-li-infobgred"><a href="hospital.php"><span class="mm-li-infoE">Hospital('.$hc.')</span></span></a>';
}
echo'<img src="mmbottom.png">
<hr /><img src="mmtop.png">';
if ($jc == 0) {
echo'<a href="wmanager.php"><span class="mm-li-info">Weather Manager</span></a>';
}
else {
echo'<span class="mm-li-infobgblue"><a href="jail.php"><span class="mm-li-infoE">Jail ('.$jc.')</span></span></a>';
}
echo'<a href="new_staff.php"><span class="mm-li-info">Staff Panel</span></a>
<a href="announcement.php"><span class="mm-li-info">Announcement</span></a>
<a href="search.php"><span class="mm-li-info">Search</span></a>
<a href="newspaper.php"><span class="mm-li-info">Newspaper</span></a>';
if ($ir['gang'] !=0) {
echo'<a href="gang.php"><span class="mm-li-info">My Gang</span></a>';
}
echo'<img src="mmbottom.png">
</center><hr />
';
echo'<img src="mmtop.png"><a href="preferences.php"><span class="mm-li-info">Preferences</span></a>
<a href="preport.php"><span class="mm-li-info">Player Report</span></a>
<a href="gamerules.php"><span class="mm-li-info">Game Rules</span></a>
<a href="viewuser.php?u='.$ir['userid'].'"><span class="mm-li-info">My Profile</span></a>
<a href="logout.php"><span class="mm-li-info">Log Out</span></a>
<img src="mmbottom.png">';
print "<hr />The Time Is:";
echo date ('<font color=Red>F j, Y</font>')."".date('<font color=white>g:i:s a</font>');
echo'</white>';
?>

No i'm not looking through all that. I gave you a possible solution, unless you want to pay me I will only give guidance, I won't spoonfeed you

Posted

Your aligning the images on the left

 

Align the images to the center?

Posted (edited)
echo'<center>

<img src="mmtop.png">

<a href="index.php"><span class="mm-li-info">Home</span></a>

have you tried removing that <centeR>

since the only part that doesn't mess up is and it doesnt contain then <center> tag

echo'<img src="mmtop.png"><a href="preferences.php"><span class="mm-li-info">Preferences</span></a>
<a href="preport.php"><span class="mm-li-info">Player Report</span></a>
<a href="gamerules.php"><span class="mm-li-info">Game Rules</span></a>
<a href="viewuser.php?u='.$ir['userid'].'"><span class="mm-li-info">My Profile</span></a>
<a href="logout.php"><span class="mm-li-info">Log Out</span></a>
<img src="mmbottom.png">';
print "<hr />The Time Is:";
echo date ('<font color=Red>F j, Y</font>')."".date('<font color=white>g:i:s a</font>');
echo'</white>';
?>
Edited by Jason-x

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.   Paste as plain text instead

  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...