When creating a code page how do I link my CSS page with my HTML page? I have this now

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Photo of Joe

Joe

  • 40 Points

Posted 2 years ago

  • 0
  • 1
Photo of Nathan

Nathan

  • 60 Points
Photo of Joe

Joe

  • 40 Points
I tried this and still no luck. I'm hoping its not my CSS that's incorrect. This is what I have right now

<head>
    <link href="https://xxxxxxxxxx.quickbase.com/db/xxxxxxxxx?a=dbpage&pageID=23" type="text/css" rel="stylesheet">
  </head>

23 being the page ID of my CSS sheet.

My sample CSS test code is

.main  h3 {
  text-align: "center";
  color: #006400;
  }
Photo of Nathan

Nathan

  • 60 Points
I am assuming that the class main is something you brought in? Your link is correct so that is not the issue. When you named your page you called it SOMETHING.css to let the system know it is a CSS document? Also, have you tried the CSS directly on your HTML page, this would make it much easier to test.

<head>
    <style>
        .main  h3 {
            text-align: center;
            color: #006400;
        }
    </style>
</head>
Photo of Joe

Joe

  • 40 Points
Nathan, my CSS was incorrect. I looked at it this morning with a fresh head and I had unnecessary quotations around center and color. My CSS was linked the whole time with bad code! Thanks for all your help.
Photo of Nathan

Nathan

  • 60 Points
Good catch, I didn't see that either, it's easier error to make, especially if you do jQuery, but I am glad you found your issue.