Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Add css code from template admin

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I read somewhere that when I need to add css code I can add it from my template administrator, is that correct? If yes how do I do that? In my template settings custon scribts maybe?

What I have is a code that shows my logo airballoon rising from botom to the top. Just one time and only on my front page. Someone made me some code, that is css and html. The html part I added to my index.php, but now I think that this also should have been added to the backsite.
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi Christina,

You can add inline css to the before </head> box on the custom code tab.
You would need to wrap the css in style tags as the contents of the text area is outputted directly.
<style>
.myclass{
rule: value;
}
</style>

Editing the index file directly is not a good idea as it would be overwritten if the template is updated.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
So I should move the Html code again from my index.php? It is just a short line
<div class="hotairballoon"></div>

And add it here too?

And sorry, but I don't understand where to but the css code, so that they get wraped.

This is my code:

.hotairballoon {
position:absolute;
top: 0;
left: 200px;
width: 100px;
height: 100px;
border-radius: 50%;
background: rgba(255,0,0,1);
animation: propel-balloon 10s linear;
}

@keyframes propel-balloon {

0% {
position:absolute;
top: 500px;
left: 1000px;
}

25% {
position:absolute;
top: 400px;
left: 1000px;
}

50% {
position:absolute;
top: 250px;
left: 900px;
}

75% {
position:absolute;
top: 100px;
left: 400px;
}

100% {
position:absolute;
top: 0;
left: 200px;
}
}


This before <style>

And this after?

</style>
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi,
Yes, insert your css between those 2 tags.

The html shouldn't go in the head section but you can add it to the after <body> or before </body> areas
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
and if shomething went rong :-/ where did that code go?
I've got a blank website now.
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
What went wrong?
You should just be able to remove the code and save the settings again.
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
my website is down. www.butik.meisolle.com/
In my admin template the coding is gone, so I figured that I need to find it in some template css file, but I cant find it ..
I shouldn't mess with this :-)
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
The code is proberly not working
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
In the admin

Turn up error reporting to maximum

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
where do I do that Paul?
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Sorry I found it and did it
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Its enabled now - yes?

I'm still seeing a blank screen

Just wanted to check

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes it is enabled, I also see a blank screen :-(
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
I have a backup if this is totally hopeless, just so you know.
I don't want you to spend to much time you don't have on my mess :-)
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Was it just the custom code you added?

A new extension wasn't added at the same time?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
no, just the code both css and html through the backend
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
And those are both removed?
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
no, thats my problem I don't know where to find them. I looked in the template.css and the greens.css with no luck.
I don't see them at all in the template admin
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
I'm interested in the html not the css at this stage - the css may break the presentation of the site

But I'm assuming the actual template file is broken either by an edit or a removal of some code by accident

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
First I did add the small html code to the index.php in the template, but I removed that, before I added the code from the back end.
Now when I looked again, the code was there again. Now I removed it again.

I am carefull when I move stuff in the files, so I am cloose to sure that I didn't remove anything more than what I added. But..
  • Christina's Avatar
  • Christina
  • 12 Month basic
  • 241 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers