se7enet purgatorio

Page 3 of 3 <123
Topic Options
Rate This Topic
#17866 - 08/02/08 07:41 PM Re: body background in the middle panel [Re: Evilman]
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
Ok, I just ran into a problem with this.

After replacing the code in template/primary.php with Jamin's suggestion, If I paste this code in the town_buy1.php, it shows the image fine.

<style type="text/css">
#maincontent { background-image: url(images/background.jpg); }
</style>

However, if I also paste this code below in panels_left.php, it overrides the background image I declared above in town_buy1.php and will show the new images/leftback.jpg in the middle frame when it should be showing it in the left panel. So whenever the middle frame is displayed, it will only showed image below. Any ideas?

<style type="text/css">
#maincontent { background-image: url(images/leftback.jpg); }
</style>


Edited by Evilman (08/02/08 08:00 PM)

Top
#17867 - 08/02/08 08:25 PM Re: body background in the middle panel [Re: Evilman]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Change #maincontent to #maincontent2
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17868 - 08/02/08 09:06 PM Re: body background in the middle panel [Re: Fayt]
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
Hi Masterofollies,

Tried what you suggested by changing the #maincontent2 for panels_left.php, after doing that, it displays the background image for the towns_buy1.php, it doesn't display the background image in the panels_left.php.

It's like I didn't call that second background image at all \:\(


Edited by Evilman (08/02/08 09:08 PM)

Top
#17871 - 08/03/08 09:28 AM Re: body background in the middle panel [Re: Evilman]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Post the pieces of coding from both scripts. Just what relates to what needs changing, not the whole script.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17874 - 08/03/08 03:45 PM Re: body background in the middle panel [Re: Fayt]
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
The first one below is from town_buy1.php


<style type="text/css">
#maincontent { background-image: url(images/armory.jpg); }
</style>

<?php

// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20

// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).

$template = <<<END
Buying weapons will increase your Attack Power<br>Buying armor, shields and other items will increase your Defense Power.<br /><br />
<div class="big">
<b>The stats for your current items are:</b></div>
{{olditems}}<br />
<div class="big"><b>The following items are available in this town:</b></b></div>
{{itemtable}}
<br />
If you've changed your mind, you may also return to <a href="index.php">town</a>.
END;

?>

-----------------------------------------
This one below is from panels_left.php

<style type="text/css">
#maincontent2 { background-image: url(images/leftimage.jpg); }
</style>


<?php

// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20

// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).

$template = <<<END
<div class="big"><b>Location</b></div>
{{action}} {{townname}}<br />
Realm: {{worldname}}<br />
Latitude: {{latitude}}<br />
Longitude: {{longitude}}<br /><br />


I didn't post the whole code, just the upper portion of each of them \:\)



Edited by Evilman (08/03/08 03:49 PM)

Top
#17875 - 08/03/08 04:18 PM Re: body background in the middle panel [Re: Evilman]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Your setting it for the whole background that way. Use a DIV and call it from the css.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17877 - 08/03/08 07:09 PM Re: body background in the middle panel [Re: Fayt]
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
Masterofollies, I tried what you suggested but nothing showed up

This is what I put at the very top of the panels_left.php file. Am I doing this correct?

<style type="text/css">
div.background
{
width: 500px;
height: 250px;
background: url(images/leftimage.jpg) repeat;
border: 2px solid black;
}

Top
#17880 - 08/03/08 09:31 PM Re: body background in the middle panel [Re: Evilman]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Because you have to call it for the table or frame.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17884 - 08/06/08 01:30 AM Re: body background in the middle panel [Re: Fayt]
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
I'm a bit lost, how would i call it for each frame? specifically, the panels_left.php? \:\/
Top
#17885 - 08/06/08 09:51 AM Re: body background in the middle panel [Re: Evilman]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
HTML: class="background" goes with CSS: .background

HTML: id="background" goes with CSS: #background

The CSS looks fine. I like to quote filenames, like so:

Code:

background: url('images/leftimage.jpg') repeat;

(makes it highlight and easier to read in my text editor) but the code will validate either way.

You might consider not using a separate div for the background, but instead just giving the main content div the background, in the interest of less bloated code. That said, there are instances where a separate background div is called for, like on my website (linked in the signature). I had to use an extra div because the main content div has CSS borders. But it's your call.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
Page 3 of 3 <123


Hop to:

se7enet

Barack Obama Logo