Problem implementing CSS code

  • 1
  • Question
  • Updated 9 years ago
  • Answered
I know I am doing something wrong here. All I want to do is be able to change the CS globally for every occurrence of my Alphabet HTML widget I have an every page in my Bennett Archives page so that I will be able to make global changes if need be.

My web site is www,mcran.com. Just click on the Bennett Snippets link . Below is the code I use for the Alphabet HTML widget.

<style type="text/css"> @import url(http://sd.mcran.com/assets/menu/alpha...; .alphabet </style> <br/><br/><br/> <a href="http://www.mcran.com/a.php&quot;&gt;A...; •&nbsp; <a href="http://www.mcran.com/b.php&quot;&gt;B...; •&nbsp; <a href="http://www.mcran.com/c.php&quot;&gt;C...; •&nbsp; <a href="http://www.mcran.com/d.php&quot;&gt;D...; •&nbsp; <a href="http://www.mcran.com/e.php&quot;&gt;E...; •&nbsp; <a href="http://www.mcran.com/f.php&quot;&gt;F...; •&nbsp; <a href="http://www.mcran.com/g.php&quot;&gt;G...; •&nbsp; <a href="http://www.mcran.com/h.php&quot;&gt;H...; •&nbsp; <a href="http://www.mcran.com/i.php&quot;&gt;I...; •&nbsp; <a href="http://www.mcran.com/j.php&quot;&gt;J...; •&nbsp; <a href="http://www.mcran.com/k.php&quot;&gt;K...; •&nbsp; <a href="http://www.mcran.com/l.php&quot;&gt;L...; •&nbsp; <a href="http://www.mcran.com/m.php&quot;&gt;M...; •&nbsp; <a href="http://www.mcran.com/n.php&quot;&gt;N...; •&nbsp; <a href="http://www.mcran.com/o.php&quot;&gt;O...; •&nbsp; <a href="http://www.mcran.com/p.php&quot;&gt;P...; •&nbsp; <a href="http://www.mcran.com/q.php&quot;&gt;Q...; •&nbsp; <a href="http://www.mcran.com/r.php&quot;&gt;R...; •&nbsp; <a href="http://www.mcran.com/s.php&quot;&gt;S...; •&nbsp; <a href="http://www.mcran.com/t.php&quot;&gt;T...; •&nbsp; <a href="http://www.mcran.com/u.php&quot;&gt;U...; •&nbsp; <a href="http://www.mcran.com/v.php&quot;&gt;V...; •&nbsp; <a href="http://www.mcran.com/w.php&quot;&gt;W...; •&nbsp; <a href="http://www.mcran.com/x.php&quot;&gt;X...; •&nbsp; <a href="http://www.mcran.com/y.php&quot;&gt;Y...; •&nbsp; <a href="http://www.mcran.com/z.php&quot;&gt;Z...; •&nbsp; <br/><br/><br/>
Photo of Randy

Randy

  • 643 Posts
  • 8 Reply Likes
  • finding it hard to implement CSS into my Yola project.

Posted 9 years ago

  • 1
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
<!--

whats the problem?

You need a ; after the alignment

If your trying to align the text centered then it would be better to use
text-align: center;

I use this method to call css files.
<link rel="stylesheet" type="text/css" href=" " />

Hope that helps.

Lee.
-->
Photo of Randy

Randy

  • 643 Posts
  • 8 Reply Likes
Hi Lee,

This is what I have in my CSS file. Does this look right? The code you mentioned above, can I just paste that at the top of the code I mentioned in my initial post and just Href to the CSS file I have on my server?

.alphabet{
font-size: 14px;
color: Black;
text-align: center;
}

Thanks Lee for your incredible patience. :)
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
<!--

The code above is a bit broken by the fourm so its hard to tell.

If you add this at the top of the page in a html widget

<link rel="stylesheet" type="text/css" href="http://sd.mcran.com/assets/menu/alpha..." />

Then you will have to somehow call the class so if you wrap all the code in a div so it looks like this

<div class="alphabet">

<a href="http://www.mcran.com/a.php">A&lt;/a>•...;
<a href="http://www.mcran.com/b.php">B&lt;/a>

</div>

That should do it.

Lee.

-->
Photo of Randy

Randy

  • 643 Posts
  • 8 Reply Likes
That worked!! Thanks again!