ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Unique Title Styles

January 21, 2011 8:28pm

Subscribe [3]
  • #1 / Jan 21, 2011 8:28pm

    Color-ize

    27 posts

    We’ll start off with the version information:

    v2.1.1 - © Copyright Notice 2003 - 2010 EllisLab, Inc.
    Script executed in 0.1460 seconds - 26 SQL queries used - Build:  20101020

    Next here is my problem. I am trying to style each Title with a unique “id” which I have used {entry_id} to define (since each page will be individually defined).

    In my code I have an <h1 id=”{entry_id}”>{title}</h1>
    I have entered the title tag into my css as h1#21 (for the identification of page 21 obviously with it’s specific title). This however seems to render the CSS then render the page with the identifier placed after the fact because none of my css is influencing this particular page (or any of the unique pages I’ve created).

    Am I missing something that makes this not work functionally. Looking in both my css and on the screen everything looks like it is loading correctly and should technically replace the content with an image..but it doesn’t do anything. Doesn’t alter the color - doesn’t alter the size. Basically it’s defunct.

    Any assistance would be amazing! 😊
    Thanks,
    Seth

  • #2 / Jan 23, 2011 2:50pm

    Greg Salt

    3988 posts

    Hi Seth,

    According to the HTML Specification IDs must start with a letter. Please try naming your IDs like this:

    <h1 id=”title-{entry_id}”>{title}</h1>

    Cheers

    Greg

  • #3 / Jan 23, 2011 8:03pm

    Color-ize

    27 posts

    I never realized that! Learn something more everyday - thanks a lot for the response - if it doesn’t work I’ll let you know 😊 Otherwise, Thank you very much!
    Seth

  • #4 / Jan 24, 2011 9:16am

    Sue Crocker

    26054 posts

    Glad Greg was able to help. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases