Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 13:29
    Ben Merrick
    0

    StyleSheet is not applying all properties

    I am new to Umbraco, so this may be a minor problem that i have yet to find a solution to.  I have a stylesheet names Styles that houses all of my CSS information.  The problem is that only certain parts of the stylesheet are working while others are not.  When I apply this same stylesheet in Visual Studio, it works perfectly fine.  Has anyone else ran into the problem before?  Here are a few basic bits of information that may be able to help you help me:

    Browser:  Internet Explorer 8

    Umbraco Version:  4.0.2.1

  • Sjors Pals 617 posts 270 karma points
    Oct 26, 2009 @ 13:39
    Sjors Pals
    0

    Do you use firebug extension for FireFox? It's an extremely strong tool to check these kind of problems.

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 14:02
    dandrayne
    0

    I'd run your final css through this ->  http://jigsaw.w3.org/css-validator/

    Sounds a lot like what happens when you miss a closing }

    #stuff {
    font-size: 100px;

    .uh_oh {
    broken: yes
    }


    Dan

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 14:08
    Ben Merrick
    0

    I ran my css file through the validator and it turned up no errors.  Funny thing is that it all works when I remove certain properties from my css file and apply them directly into the templates by removing the class property from the tag and replacing it with a sytle property which has the exact same style, much like this:

    <td class="MySample"> - Doesn't work

    <td style="background-image: url(images/MyImage.jpg")> - Works

    Strange...

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Oct 26, 2009 @ 14:16
    Rasmus Berntsen
    0

    I've never had such a problem in Umbraco... Same problem in a different browser?

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 14:21
    dandrayne
    0

    Firebug is your best bet, to see what your element is inheriting.  If you can put !important at the end of your css statement and it works you know it's an inheritance issue.

    .MySample {
    background-image: url(images/MyImage.jpg) !important;
    }

    Dan

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 14:21
    Ben Merrick
    0

    Same probelm in IE 8 and in FireFox 3.x

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 14:31
    Ben Merrick
    0

    @dandrayne - Even with "!important" added, it still failed to render.  Firebug yielded exactly what is in the css file, so I can't pinpoint the issue from there.

    Before moving forward with this, I want to take the time to thank everyone for their help on this.  I know it's not always easy working with someone new to a CMS such as Umbraco, so thanks for showing paitence with me.

    Anyways, back to the issue at hand.  Here are the pieces of my css that are not functioning properly (if it can help pinpoint an error), everything else renders correctly.

    body {
    background-color:#F3F4F8;
    background-image:url(images/background.gif) !important;
    background-repeat:repeat-x;
    color:#595959;
    font-family:Trebuchet MS,Arial,Helvetica,sans-serif;
    font-size:75%;
    line-height:175%;
    margin:0;
    padding-bottom:12px;
    padding-top:12px;
    }
    .TopLinks
    {
        padding: 3px 15px;
        background-color: #a3aab2;
        color: #000000;
        font-size: 95%;
        height: 20px;
    }

    The TopLinks class is used to format links that appear in the top of my page body.  These seem to be the only two items that are not rendering properly.

    Thanks for your help in advance.

     

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 14:32
    Ben Merrick
    0

    @dandrayne - Even with "!important" added, it still failed to render.  Firebug yielded exactly what is in the css file, so I can't pinpoint the issue from there.

    Before moving forward with this, I want to take the time to thank everyone for their help on this.  I know it's not always easy working with someone new to a CMS such as Umbraco, so thanks for showing paitence with me.

    Anyways, back to the issue at hand.  Here are the pieces of my css that are not functioning properly (if it can help pinpoint an error), everything else renders correctly.

    body
    {
    background-color:#F3F4F8;
    background-image:url(images/background.gif) !important;
    background-repeat:repeat-x;
    color:#595959;
    font-family:Trebuchet MS,Arial,Helvetica,sans-serif;
    font-size:75%;
    line-height:175%;
    margin:0;
    padding-bottom:12px;
    padding-top:12px;
    }
    .TopLinks
    {
        padding: 3px 15px;
        background-color: #a3aab2;
        color: #000000;
        font-size: 95%;
        height: 20px;
    }

    The TopLinks class is used to format links that appear in the top of my page body.  These seem to be the only two items that are not rendering properly.

    Thanks for your help in advance.

     

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Oct 26, 2009 @ 15:43
    Rasmus Berntsen
    0

    Is this online somewhere, so we could take a look at it? The CSS looks alright to me... :)

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 16:05
    dandrayne
    0

    Yeh, the css looks ok.

    Perhaps sticking it online somewhere is the way to move forward

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 16:12
    Ben Merrick
    0

    I haven't moved the site live yet, as the client I am working with has not approved the content; so I cannot move it on to a public domain as of this time.  I know that hinders all of your abilities to help me out and I apologize for that.

    I currently have a workaround for it in place (using dynamic CSS in the HTML on the master page), so it is not a show-stopping error right now.  Thank you for all of your help up to this point, and I have not given up on getting a resolution.  At this time, though, I have to move with my work-around as the next project milestone is around the corner.

  • Ben Merrick 12 posts 32 karma points
    Oct 26, 2009 @ 16:14
    Ben Merrick
    0

    Sorry to double post, but I think I just may have ran into something.  My templates are missing the following line:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Being as I am new to Umbraco, I wouldn't know if this would have something to do with my rendering problems.  If this does happen to be the case, where should i plant this line to resolve the issues.

  • Sjors Pals 617 posts 270 karma points
    Oct 27, 2009 @ 11:17
    Sjors Pals
    0

    I think the templating forum is the best place, but remember that you always have maximum control over templates in Umbraco, Umbraco itself does not add any code to your output, when i implement templates, i always start to define a Master Template, and the other ones, then i paste the raw HTML in it, and check or it renders ok. After that i copy the html segements to macro's and make them dynamic, doing it that way works really nice.

  • dandrayne 1138 posts 2262 karma points
    Oct 27, 2009 @ 11:27
    dandrayne
    0

    No doctype will send your pages into quirksMode and affect rendering for sure.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 27, 2009 @ 12:11
    Jan Skovgaard
    0

    Hi Ben

    You should place your doctype right after these two lines in you master template

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">

    So the first three lines looks like this

    <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Hope this helps

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft