News CSS

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

News CSS

Post by fredt »

I'm perhaps wrong, but my News page refers to "" for the More link - which class isn't defined in News CSS (under Mozilla, http://mysite/stylesheet.php?templateid=15)

So I get some standard text layout, and the 'p' bar in my MoreText (it's set to french, "par ici") disappears.

What is this NewsSummaryMorelink css class supposed to be ?

(using 0.11.2 version on Apache and IE)

Thanks for any suggestion !

FredT
amygdela

Re: News CSS

Post by amygdela »

you can edit your own CSS styles for it. Just put in a new stylesheet, copy the classes from the news template and create your own styles!

You don't HAVE to use these classes, you can change the whole template if you wish...
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: News CSS

Post by fredt »

Sure I can re-design everything - but I'd prefer using existing things... I need to trust and use CMSMS, not to test/debug it to check if all styles are correctly delivered when they appear in a class... or spending time trying to understand why some things look strange in IE, firefox, Opera, PC & Mac & Linux &..., while overall performance is GOOD !

So : is there anybody out there who has the correct News css ?

TIA,

Fred
westis

Re: News CSS

Post by westis »

Hi fredt,

There is no correct CSS for NewsSummarMoreLink. That is not included in the default stylesheet (which it perhaps should be). So just style it the way you want, something like this:

.NewsSummaryMoreLink {
  color: #ccc;
  font-weight: bold;
}


or whichever style you want to give to it. We'll include some styling for NewsSummaryMoreLink (or at least an empty class in the stylesheet) in the stylesheet for 0.12, so that it's easier for people to know what classes are used by the default News templates (they can also be seen by looking at the templates in Content -> News).
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: News CSS

Post by fredt »

Thanks westis... but...

...It took me some minutes to figure out the code uses NewsSummarMorelink and not NewsSummarMoreLink.

so now I test with
.NewsSummaryMorelink {
   color: #ff0000;
   font-weight: bold;
  }

but arghhh  I get only
[this way please...] ,
because the code says
   
      [{$entry->morelink}]
   
which translates to
   
[this way please...]


.... so the does not apply the style !

Can you please help me fixing this (not so trivial) little thing ?

TIA - FredT
westis

Re: News CSS

Post by westis »

ah, ok, you need to use .NewsSummaryMorelink a {} as the color is applied to the anchor (link element). Sorry for that.
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: News CSS

Post by fredt »

What a nice stupid little thing...  ;) It still refuses to work.

I now have

.NewsSummaryMorelink{
   color: #ff0000;
   font-weight: bold;
  }

.NewsSummaryMorelink a {
   color: #ff0000;
   font-weight: bold;
  }

but it's still *not* red...

Any idea ?
(OK, I guess I should RTFM a good css guide...)

UPDATE : I hate Gill Bates... It works OK with Firefox, but not with IE(6). Any IE trick ? /UPDATE
Last edited by fredt on Fri Jan 20, 2006 3:13 pm, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: News CSS

Post by Russ »

I don't know the module at all, but for msie you could try:

/* For normal links */
.NewsSummaryMorelink a:link {
  color: #ff0000;
  font-weight: bold;
  }

Also thinks about:

/* For visited links */
.NewsSummaryMorelink a:visited {
  color: pink;
  font-weight: bold;
  }

/* For active links */
.NewsSummaryMorelink a:active {
  color: green;
  font-weight: bold;
  }


Hope this helps,

Russ
Last edited by Russ on Fri Jan 20, 2006 4:28 pm, edited 1 time in total.
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: News CSS

Post by fredt »

Thanks all,

Russ : it didn't work - I came to conclude there's a css conflict with another definition "upper" in the css - and I suppose IE and firefox don't handle such conflicts the same way. If anybody has a good link/paper on this topic... might be interesting for the rest of us.

In this case, "Fontweight" seems not to be defined elsewhere - so I can switch for normal to bold with success. But "color" fails...

Anyway, (I think) I'm just having a problem with line height (or margins) - so I should be able to manage this one.

...It would be fine for the dev team to have some kind of validating tool - for instance, to test that all called styles do exist...

FredT
westis

Re: News CSS

Post by westis »

You can always use !important to make sure that that style gets applied, like this:

.NewsSummaryMorelink a {
  color: #ff0000 !important;
  font-weight: bold;
  }


I'lll look more into it at some other point, busy finishing stuff before going to Kenya in a week. :D
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: News CSS

Post by fredt »

YES !!! It works ! Thanks a lot !

... Please find here all our sympathy in this cruel moment... Holidays are such a terrible thing....  8)
Post Reply

Return to “Layout and Design (CSS & HTML)”