Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7016079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:44:15+00:00 2026-05-27T22:44:15+00:00

I have a website developed in Joomla 1.7. I want to keep background Image

  • 0

I have a website developed in Joomla 1.7. I want to keep background Image only at home page not on other pages.

code is like this.

HTML

<body>
 <div id="wrapper">
  all content goes here
 </div>
</body>

CSS

body{margin:0px; padding:0px;}

#wrapper{background:url(../images/bg-img.jpg) repeat-x;}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:44:16+00:00Added an answer on May 27, 2026 at 10:44 pm

    As Purmou mentioned, none of these methods will work because Joomla uses the same index.php from the template so every page on the site will include the CSS class or ID if you code it in there.

    Lucky for you, Joomla took this in to account and you can easily do what you are trying to do with a simple mod to your template. Joomla uses what is called the page class suffix to allow you to make page specific CSS. Any time you create a menu item, you have an option to include a page class suffix which will only be added to pages within that menu item. In order to put that suffix in the body tag so you can achieve what you are trying to do, add this code to your index.php in your template:

    <?php
    $app = JFactory::getApplication('site');
    $params =  & $app->getParams('com_content');
    $pageclass = trim($params->get('pageclass_sfx'));
    ?>
    <body id="<?php echo $pageclass ? $pageclass : 'default'; ?>">
    

    If you add a page class suffix to a menu item, it will be inserted as the body tag ID. If you don’t it will use “default” instead. This way you can control the ID of the body on a per page basis and male changes specific to every page on the site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website developed in Joomla. I want to add my gtalk id
I have a website developed in php and Joomla.Now i want to add a
I have developed a website using Razor (Microsoft WebMatrix) and now I want to
I have developed a facebook page tab app for my website and now I
I have a website developed using ASP.NET MVC3. I now want to expose a
I want to have a feature for my website which can print the page
I have developed a joomla website. I also have a PHP based website. Let's
I have a website developed using C#. I want to see the caller of
I have developed a website where the back button does not always go back
I have developed a website having 10 pages and now i am facing a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.