WordPress.org

Ready to get started?Download WordPress

Forums

Internal CSS in WordPress 1.5 beta pages (3 posts)

  1. Pathoschild
    Member
    Posted 9 years ago #

    I forgot what build I'm using. I'll just hope it's not necessary. -.-

    I'm attempting to add an internal CSS to my pages for formatting. However, only the first targetted tag on the page is being formatted. Below is the code I'm using (the CSS is placeholder code at the moment, until I get it working).


    <style type="text/CSS">
    .links_category
    {font-size: 10%;
    padding-top: 15px;}

    .links_title
    {font-size: 200%;
    padding-top: 100px;}
    </style>


    <span class="links_category">Category</span>
    <span class="links_title"><a href="#">Title</a></span>
    Description

    Ideally, the CSS would apply to both, but it only applies to the first one. Any suggestions would be appreciated. My website is http://pathos.bizhat.com and the page in question the Links page.

  2. Lorelle
    Member
    Posted 9 years ago #

    Spans only travel for the line they are on. Any line break and they are toast. They also don't do well inside of each other. Try changing this to DIV instead of SPAN and see what happens.

    10% is really tiny, so you might want to make that a little larger, though you do say that this is the one that is working. Ah, check the CSS for your anchors (a) like those found in:

    <div id="header"><a href="nothing.html">Nothing Title</a></header>

    Which you might find listed as:

    #header a {some style stuff here]

    This might be influencing the second style reference.

  3. Pathoschild
    Member
    Posted 9 years ago #

    I eventually solved this. It turns out that I had an option selected in the configuration to automatically make all posts (pages count as posts, it seems) valid XHTML. That option for some reason refused to recognize certain valid XHTML tags, thus destroying the CSS scheme. I fixed it by deselecting that option.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.