How to add background image in Protostar?

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
shukat1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Mar 06, 2018 1:55 pm

How to add background image in Protostar?

Post by shukat1 » Mon Apr 09, 2018 5:17 pm

Here is my website link: http://mobilephonehistory.site/

Been trying to add he image in for ages but cant do it someone please help!

My code from line 190 to 197 isn't being recognized?

body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #333;
background-color: #fff;
background-image: url('/images/iphone');
Last edited by toivo on Mon Apr 09, 2018 5:54 pm, edited 1 time in total.
Reason: mod note: change subject to normal case - please read the forum rules about subject line from https://forum.joomla.org/viewtopic.php?f=8&t=65

Mr. Wimpy
Joomla! Explorer
Joomla! Explorer
Posts: 443
Joined: Fri Dec 02, 2005 10:46 am
Location: The Netherlands

Re: HOW TO ADD BACKGROUND IMAGE IN PROTOSTAR?

Post by Mr. Wimpy » Mon Apr 09, 2018 5:35 pm

Change the line for background-image to:

Code: Select all

background-image: url('/templates/protostar/images/iphone.jpg');
- I added '/templates/protostar' to the url
- I added .jpg as file extension

shukat1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Mar 06, 2018 1:55 pm

Re: HOW TO ADD BACKGROUND IMAGE IN PROTOSTAR?

Post by shukat1 » Mon Apr 09, 2018 5:43 pm

Mr. Wimpy wrote:Change the line for background-image to:

Code: Select all

background-image: url('/templates/protostar/images/iphone.jpg');
- I added '/templates/protostar' to the url
- I added .jpg as file extension

Hi, ive added it in but its still not picking it up? Does my code seem right? Never been good at css

Mr. Wimpy
Joomla! Explorer
Joomla! Explorer
Posts: 443
Joined: Fri Dec 02, 2005 10:46 am
Location: The Netherlands

Re: How to add background image in Protostar?

Post by Mr. Wimpy » Mon Apr 09, 2018 6:14 pm

Line 7130 body.site overrides the background-image of body (line 190).
You either need to remove that background-image from body.site or add the above changes as well.

Can I give you another advice: it looks like you are editing the Protostar template.
This template comes with Joomla by default and with the next update your changes will be lost.

Either add the changes to user.css or make a copy of Protostar and edit that.


Copying protostar:
1. Copy the folder protostar (i.e. protostar2)
2. Open protostar2/templateDetails.xml edit the name to protostar2
3. In Joomla admin, go to Extensions > Manage > Discover
4. You should see protostar2 template, select and click Install
5. Go to Extensions > Templates and set protostar2 as default

Regards,
Wim

shukat1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Mar 06, 2018 1:55 pm

Re: How to add background image in Protostar?

Post by shukat1 » Tue Apr 10, 2018 3:59 pm

Mr. Wimpy wrote:Line 7130 body.site overrides the background-image of body (line 190).
You either need to remove that background-image from body.site or add the above changes as well.

Can I give you another advice: it looks like you are editing the Protostar template.
This template comes with Joomla by default and with the next update your changes will be lost.

Either add the changes to user.css or make a copy of Protostar and edit that.


Copying protostar:
1. Copy the folder protostar (i.e. protostar2)
2. Open protostar2/templateDetails.xml edit the name to protostar2
3. In Joomla admin, go to Extensions > Manage > Discover
4. You should see protostar2 template, select and click Install
5. Go to Extensions > Templates and set protostar2 as default

Regards,
Wim
What will happen if i don't update my Joomla version will it stay? Its only for uni. How often do they update?

shukat1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Mar 06, 2018 1:55 pm

Re: How to add background image in Protostar?

Post by shukat1 » Tue Apr 10, 2018 8:28 pm

Mr. Wimpy wrote:Line 7130 body.site overrides the background-image of body (line 190).
You either need to remove that background-image from body.site or add the above changes as well.

Can I give you another advice: it looks like you are editing the Protostar template.
This template comes with Joomla by default and with the next update your changes will be lost.

Either add the changes to user.css or make a copy of Protostar and edit that.


Copying protostar:
1. Copy the folder protostar (i.e. protostar2)
2. Open protostar2/templateDetails.xml edit the name to protostar2
3. In Joomla admin, go to Extensions > Manage > Discover
4. You should see protostar2 template, select and click Install
5. Go to Extensions > Templates and set protostar2 as default

Regards,
Wim
Sorry for being a noob but would I just create a new css file called user.css and. Copy and paste all that in from the template.css? Would I need to do anything else or will it recognise the new css file itself? Would I have to join it with anything? Thank you

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: How to add background image in Protostar?

Post by sozzled » Wed Apr 11, 2018 1:06 am

shukat1 wrote:Sorry for being a noob but would I just create a new css file called user.css and. Copy and paste all that in from the template.css? Would I need to do anything else or will it recognise the new css file itself? Would I have to join it with anything?
See also viewtopic.php?f=706&t=961035&p=3520523#p3520523

No, you don't have to join anything. Protostar will detect and use the CSS contained in the file user.css if that file exists. It's automatic.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30923
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: How to add background image in Protostar?

Post by Per Yngve Berg » Sat Apr 14, 2018 4:26 pm

Mod. Note: Relocated the topic to the Templates Forum.


Locked

Return to “Templates for Joomla! 3.x”