tip: Images w/ borders, margins

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
Posts: 1
Joined: Mon Jan 05, 2009 9:12 pm

tip: Images w/ borders, margins

Post by quags » Mon Jan 05, 2009 11:09 pm

I liked to add margins and borders to my images by changing the stylesheet, but this effected also the buttons in oedit. :(
Perhaps somebody found already another solution - i found this:

in line 163..164 of oedit.php add class-attribute to the document.write-functions:
if(btns[0]!="")document.write("<img class=\"btn\" src=\""+getimage(btns[0])+"\" id=\""+btns[0]+"\" alt=\""+btns[1]+"\" title=\""+btns[1]+"\" onclick=\"cmd(\'"+btns[0]+"\')\" width=\"23\" height=\"22\" style=\"border:outset 1px;\" onmouseover=\"this.style.border=\'inset 1px\';window.status=\'"+btns[2]+"\'\" onmouseout=\"this.style.border=\'outset 1px\';window.status=\'"+copyright+"\'\">");
else document.write("<img src=\""+getimage("space")+"\" class=\"btn\" alt=\"\" width=\"3\" height=\"22\">")

then change then attributes for the img-tag and add .btn-class to the stylesheet:

img {
border: 1px solid black;
margin: 10px;
border: 0;
margin: 0px;

Have fun

Posts: 282
Joined: Thu May 22, 2008 10:11 am
Location: Hamburg

Re: tip: Images w/ borders, margins

Post by Connie » Tue Jan 06, 2009 8:35 am

as often, it is very easy

you must not operate in the oedit.php

all Edit-Content has .edit-class

so define 2 ways (here an example)

Code: Select all

img {border:1px red dotted}
.edit img {border:0;}
in the stylesheet and everything is ok

do not operate the php-files! How to keep these changes when updating?
Connie Müller-Gödecke, http://www.webdeerns.de

Post Reply