Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Oak Park, IL
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation CSS not functioning - XML the cause?

    I am having problems getting my CSS to funciton properly. Now, I just recently began using XML code, and that's what my DOCTYPE is listed as (transitional) ... could this be the reason for the problem?

    If not, what other possibilities are there?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    Yeah, actually, I just converted y site from HTML to XHTML, and now some of my CSS doesn't work now. I'm using XHTML Transitional: could that have something to do with it?

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    It helps to see it?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    body {
    font: 10pt Arial, Helvetica, sans-serif;
    color: #000000;
    background: #FFEDAD url(tangradient.jpg) repeat-y;

    cursor:url("WandCursor.cur");

    scrollbar-face-color:#C09000;
    scrollbar-arrow-color:black;
    scrollbar-track-color:#c0c0c0;
    scrollbar-shadow-color:'';
    scrollbar-highlight-color:'';
    scrollbar-3dlight-color:'';
    scrollbar-darkshadow-Color:'';
    }

    A {text-decoration:none;}
    A:link {color:#0054A6;}
    A:visited {color:#D21F3F;}
    A:active {color:#A687BE;}
    A:hover {color:#E3A52A;}

    td {
    font: 10pt Arial, Helvetica, sans serif;
    color: #000000;
    }

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    And what isn't functioning?

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    The colored scrollbars. A week ago I had colored scrollbars as indicated by the CSS above. After I converted to XHTML, the colors just disappeared. It's a plain old gray scrollbar now.

    http://www.freewebs.com/hommworld/Homm/index.html

    Check out my site- you'll see the plain gray scrollbar. Also, I'm now getting a horizontal scrollbar on my main content frame (the bottom one). That started after the XHTML thing too.
    Last edited by Grant Palin; 11-25-2002 at 02:22 AM.

  • #7
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try taking the "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" out of your doctype declaration. I've had that cause problems with the scrollbars CSS before. Remember, colored scrollbars are not standards-supported CSS.

    Neil

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    That worked...So I guess that means I have to either get rid of the colors or not bother with being XHTML compliant. Is there any way around it?

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd guess you could use javascript and test for IE then set the scrollbar values if true.
    Need more emoticons?
    Visit Catman's Private Stock

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When you're in standards-compliant mode, the BODY no longer represents the entire canvas; the HTML element does. So you if you attach your scrollbar styles to HTML instead of BODY then it will work:

    html {
    scrollbar-face-color:#C09000;
    scrollbar-arrow-color:black;
    scrollbar-track-color:#c0c0c0;
    scrollbar-shadow-color:'';
    scrollbar-highlight-color:'';
    scrollbar-3dlight-color:'';
    scrollbar-darkshadow-Color:'';
    }


    This is true for all scrollbar / scrolling properties

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    Oooohhh, thanks for that tidbit! The scrollbars are colorful again!

    Something else though, if you go back to my site (link in previous post), at 800 by 600 resolution, you'll notice a horizontal scrollbar in the content frame. Would that be caused by XHTML in some way? There was no horizontal scrollbar before.

  • #12
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Motif Webs
    Try taking the "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" out of your doctype declaration. I've had that cause problems <edit> before - still means you're compliant.</edit>

    Neil

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    Victoria, BC, Canada
    Posts
    962
    Thanks
    0
    Thanked 1 Time in 1 Post
    That worked- I just tried it on my main content page, and only the vertical scrollbar remained. Could there be something wrong with my HTML causing that? Here's the source for that page I mentioned, including the DTD.

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

    <html>
    <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

    <link rel="stylesheet" type="text/css" href="styles.css" />

    <meta name="Heroes of Might and Magic 1" content="HOMM, Heroes of Might and Magic, A Strategic Quest, artifacts, heroes, troops, castles, towns, spells, skills, scenarios, campaigns, pictures, strategies, cheats, links, downloads, where to buy, 3DO, New World Computing, NWC" />
    <title>Heroes of Might and Magic Homepage</title>
    </head>

    <body onload="top.document.title = document.title;">

    <center><img src="HOMM_title.gif" width="354" height="149" border="0" alt="Heroes of Might and Magic" /></center><br />
    <h3>Welcome</h3>

    <p>Welcome, weary traveler! You are here because you are interested in learning more about Heroes of Might and Magic, right? Read onward!</p>

    <h3>What is Heroes of Might and Magic?</h3>

    <p>Heroes of Might and Magic: A Strategic Quest (HOMM for short) was produced by <a href="http://www.3do.com">3DO</a> in 1995. It is now the first chapter in the highly acclaimed Heroes of Might and Magic series. However, the subject of this site is solely on the first game. HOMM is a strategy-war type of game. You have to manage resources, while battling your opponents at the same time. You must capture and build up castles to gain more powerful troops, or surely your opponents will annihilate you... This game has almost unlimited replay potential, since you can use different strategies every time you play. It is turn-based, unlike real-time games like Warcraft and Starcraft. I prefer HOMM, because unlike the aforementioned games, you don't have to be everywhere at once! They do have their high points, such as fast-paced action, which some people do like... But that's off-topic. On this website, I will tell you as much as I can; HOMM is a complex game. I will provide information on the heroes, artifacts, creatures, and more (in short, pretty much everything)! So pull up a chair, brew a pot of coffee, and prepare to descend into the world of might and magic.</p>

    <h3>Want more?</h3>

    <p>Use the buttons in the navigation pane on the left and above to go through my site. I hope you will find the content informative and useful.</p>

    <h3>Let me know what you think!</h3>

    <p>If there is anything you want to say or ask me, you can email me or sign my guestbook. Options for both are on my Contact page.</p>

    </body>
    </html>

  • #14
    New Coder
    Join Date
    Nov 2002
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nothing wrong with it at all. You get a vertical scrollbar because you have more content than can fit on the page so the browser adds the scrollbar so the user can scroll down and read the content.

    Remember, lose the "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" from your doctype declaration or you'll end up with the same problems you started with.

    Neil

  • #15
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Motif Webs
    Remember, lose the "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" from your doctype declaration or you'll end up with the same problems you started with.

    Neil

    But if you lose the doctype, you will not longer be working with XHTML transitional.

    Doctypes, per se, do not cause problems; what causes problems is the (IMO stupid) "quirks" and "compliant" modes of IE6 and mozilla. But even these needn't inherently be a problem unless you have pages of one and pages of the other - choose one, or the other, and work with it consitently.


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •