0
Welcome Guest! Login
0 items Join Now

[ANSWERED] CSS Joomla Articles-adding CSS style to articles

  • [ANSWERED] CSS Joomla Articles-adding CSS style to articles

    Posted 15 years 7 months ago
    • hi im a noob,

      Need to know, "How can I link a css style sheet to my joomla content?"

      site im workin on will have over 200 pages when its finished.

      all of the main site text, inside modules and inside articles, needs to be styled in css.

      ive made my style sheet, it looks like this....

      main-content {
      font-family:Arial, Helvetica, sans-serif;
      font-size:17px;
      font-style:normal;
      line-height: 150%;
      font-weight: normal;
      font-variant: normal;
      color:#000000;
      text-decoration:none;
      }

      its saved as main-content.css

      inside an article, I tried linking the style sheet, while putting the text content inside a div tag with ID main-content, like this....

      <link rel="stylesheet" href="main-content.css" />
      <div id="main-content"> This is where my main page text is at</div>

      This seemed like the correct method, but it did not make my text styled when I previewed the site.

      So I added the <link rel="stylesheet" href="main-content.css" /> to my templates index.php page inside header, but still nothing.

      I have not tried adding the stylesheet through the main joomla index page, because I didnt see any other css being linked from there.

      I also tried adding the css file to my content editor css directory, so it would be available from the options of what style to apply to text, but still no luck.

      Can anybody please help me, searched google for past 2 and a half hours (And yes payed attention to what I read).

      Need to know, "How can I link a css style sheet to my joomla content?"

      EDIT: this topic originally titled: i need serious css help asap
    • Last Edit: 15 years 7 months ago by xG4fI21mftpHdRD0.
    • First Class Web Design in Anchorage, Alaska http://www.awakedesignstudios.com
    • Yves's Avatar
    • Yves
    • Preeminent Rocketeer
    • Posts: 9214
    • Thanks: 5

    Re: [ANSWERED] CSS Joomla Articles-adding CSS style to articles

    Posted 15 years 7 months ago
    • Have a look at rt_head_includes.php in your templates directory. The links to the stylesheets have been pulled out of index.php to make the template more readible.

      You could as well add your own css at the end of template.css.
    • Yves
  • Re: [ANSWERED] CSS Joomla Articles-adding CSS style to articles

    Posted 15 years 7 months ago
    • hello and thank you for your reply,

      I did as you suggested, I added a link to my style sheet inside rt_head_includes.php by adding this

      <link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/main-content-style.css" rel="stylesheet" type="text/css" />

      I uploaded my style sheet to css folder

      Inside the article is the following code:

      <div id="main-content">Websites Style Text Here</div>

      I cleared my cache, and still see no style on the text.

      Please excuse me I am a noob at this, although I've worked with Joomla sometime.

      EDIT:

      I tried changing the article code to this instead...

      <p id="main-content">Styled Text Here</p>

      still no results
    • First Class Web Design in Anchorage, Alaska http://www.awakedesignstudios.com
  • Re: [ANSWERED] CSS Joomla Articles-adding CSS style to articles

    Posted 15 years 7 months ago
    • I have my answer!

      I edited my sites template_css.css file (versatility4), I added the following css:

      p {font-size: 17px;line-height:135%;}

      and BAM!

      see I was trying to increase the font size and have the line spaces larger so the text wasnt cramed.

      so the p tag is what you get when you remove all formating from your text in joomla.

      so I removed all formating from all text in joomla, and now all my article and module text is bigger and things are looking beautiful!

      Thanks RocketTheme!
    • First Class Web Design in Anchorage, Alaska http://www.awakedesignstudios.com

Time to create page: 0.067 seconds