Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:31:07 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155550 Posts in 21714 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: define css changes via editor for one page only  (Read 367 times)
sebigbos

Offline Offline

Posts: 56


WWW
« on: August 04, 2011, 03:39:45 PM »

Hi,

I want to change the padding which is defined in the style-sheet for one page only. Do I have to create a new template for this? Or is there an easy method to change the padding using the editor?

thanks for answers,
sebigbos
Logged
badknight
Moderator
**
Offline Offline

Posts: 246



WWW
« Reply #1 on: August 04, 2011, 03:52:54 PM »

you can use PHP in the index.php of your template..

<?PHP
if(PAGE_ID == xy)
{
 echo '<div class="xyz2">';
} else {
echo '<div class="xyz">';
}
?>
Logged

Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...
Stefek
WebsiteBaker Org e.V.

Online Online

Posts: 4884



« Reply #2 on: August 04, 2011, 03:58:58 PM »

You may specify a Class to the <body> of your Template and then use simple CSS for your task

<body class="body_<?php echo PAGE_ID;?>">

and then in CSS
Code:
.myClass {padding: 10px;}

.body_10 .myClass {padding: 5px;}

There is no way to do this from editor directly.

Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
sebigbos

Offline Offline

Posts: 56


WWW
« Reply #3 on: August 04, 2011, 04:11:15 PM »

Thanks for answers, I hoped there would be a way do this from the backend-editor. So, I think copying the template and define a new one will be more simple.

At least for me...Wink.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #4 on: August 04, 2011, 04:42:08 PM »

Hello,

Quote
I hoped there would be a way do this from the backend-editor.

You can use AFE (Advanced File Editor) wich is an Admin-Tool to edit your Templates from the backend.

Download here: http://www.websitebaker2.org/de/add-ons/module/admin-tools.php

Install it as Modul. After you have installed it you can find it in the Admin-Tools.

Matthias
Logged
sebigbos

Offline Offline

Posts: 56


WWW
« Reply #5 on: August 04, 2011, 05:37:30 PM »

thanks matthias,

I´m used to do this using filezilla and notepad++, that´s o.k. I just hoped I could "overwrite" the template only for the layout of one page without changing the template.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!