Sign Up for OSTraining

Welcome, Guest
Username: Password: Remember me

TOPIC: Customize an article using Class Suffix

Customize an article using Class Suffix 1 year 1 month ago #44144

  • andres
  • andres's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
Hello

I'm trying to get an unique style to an article-
What I did:
- I am using OST BOLT Template
- Created a Custom HTML module
- Added a name Class Suffix: (space)styleservices
- Using an unique position for this module I placed it in the article


Inspected with Firebug and this is the div name:
<div class="custom styleservices">

QUESTIONS>
1. How can I add this CSS style
{
background-color: #17dbd7;
width: 300px;
height: 350px;
margin: 35px;
}

URL

senseiyoshi.com/projects/gm2012/index.php/services

Thanks
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44152

  • tessa
  • tessa's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3948
  • Thank you received: 134
  • Karma: 9
Hi Andres,

Have you checked out this OSTraining tutorial? It might have information you are looking for:
www.ostraining.com/blog/joomla/how-to-us...las-module-suffixes/
Warm Regards,

Tessa Mero



Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44161

  • andres
  • andres's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
Thanks Tessa

I tried with the steps you suggested, but nothing

The Suffix was

custom-styleservices

I used this divs and nothing.
.styleservices
{
background-color: #17dbd7;
width: 300px;
height: 350px;
margin: 35px;
}


Any suggestion ?
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44165

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Hi Andres,

Why are your trying to insert a module to change the article style? Use a page class suffix instead :)

Give the following documentation a try:
docs.joomla.org/Using_Class_Suffixes

Also, if your class is styleservices (as taken from ".styleservices {") then you should be using " styleservices" for the class suffix (please note the space in the front). There's no need to add "custom-" before it unless that's in your CSS as well, which it doesn't appear to be.

Hope this helps! :)

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44172

  • andres
  • andres's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
Thanks Nick...

Sorry, may be this is basic, but I did not get it:
- I am using module because in joomla (2.5) article I never found the parameters to use Page Class Suffix that is show in docs.joomla.org/Using_Class_Suffixes tutorial

I got a way doing the module Class Suffix

I did not add the "custom-", the system put it. I used " styleservices"

Any suggestion?
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44173

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Hi Andres,

You have to do it at the menu item level rather than the article level, so go to the actual menu item in menu manager and you'll see the "Page Class" option on the right side in the "Page Display Options".

Also, did you add the CSS to your template's main CSS file?

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44186

  • andres
  • andres's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
It is working now. Resuming the steps and correct me if I wrong. Just in case somebody else is reading:

** Creating background for specific article. (In this case the article is selected as a menu-item)
- Go to menu manager
- Select menu
- Go to menu item you want for editing. Click open or edit
- Under Page Displays Options add in CSS box your own class: " mystyle" (space before the word)
- Save it
NOTE: If you inspect the element (firebug) the div displays like:
<div clas="item-page mystyle">
IGNORE item-page
- Go to your CSS file
Optional add note
/ * my custom * /
- Add your style
.mystyle
{
background-color: #000000;
}


Thanks a lot for your help.




Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 1 month ago #44209

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Hi Andres,

You're welcome!

Perfect! Very well done! :)

How does it feel to have the issue resolved?

Kind regards,
Nick
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 3 weeks ago #44297

  • andres
  • andres's Avatar
  • OFFLINE
  • OSTarlet
  • Posts: 53
  • Karma: 0
I feel like I left behind thousand pounds that were over my back. Thanks a lot...

More questions coming soon! Off course, in a new forum!
Please become a member of OSTraining to reply to this post.

Customize an article using Class Suffix 1 year 3 weeks ago #44301

  • Nick
  • Nick's Avatar
  • OFFLINE
  • Administrator
  • Posts: 16745
  • Thank you received: 373
  • Karma: 55
Cheers, Andres! :)
Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining
Please become a member of OSTraining to reply to this post.

Sign Up for OSTraining

Powered by Kunena Forum

Open Source Training is not affiliated with or endorsed by the Joomla, WordPress or Drupal projects.
All product names and trademarks are the property of their respective owners.

Copyright 2013 Open Source Training, LLC. All rights reserved.