Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Hi

    I haven't created any sites for a long time, so I'm a bit rusty.
    My son has started gocart racing, and the local club asked me if I could redesign their somewhat basic static web-site.
    I'm planning to incorporate an activity calendar, a page where members can post equipment for sale etc, and also some administrative tools for mass email, member qualifications and more, that can easily be administered through an admin interface.

    The programming part is the easy part, CSS on the other hand is creating problems.

    I've just started, so take it for what it is. I've created a folder called "test" inside the current live site, here, so you can view it full size.

    My problem right now, is that I have a content div nested inside another div that has a yellow border right and left. All CSS and javascripts are located in external files that are called from the active page. However, I couldn't get the div's to align properly when that particular CSS code was moved to the external file.

    This is the code in question (main.css):
    Code:
    #innhold {
        position:absolute;
        left:33px;
        top:196px;
        width:1001px;
        z-index:auto;
    }
    
    #container {
        margin-left:18px;
        margin-right:18px;
        padding-left:25px;
        padding-right:25px;
        padding-top:15px;
        background-color:#FFF;
    }
    And this is part of the general layout code that are nested in a separate file (layout.txt) and generates the two vertical yellow bars around main content:
    HTML Code:
    <div id="innhold">
    
        <div style="background: url('images/margLeft.png') repeat-y left top">
        <div style="background: url('images/margRight.png') repeat-y right top">
    When that is placed inside and part of the "index.php", it looks like this:
    exampleA.jpg

    If I move it out to the external file, where all the rest of the CSS code resides, it looks like this:

    example-B.jpg

    If I try to alter the width and position data (in the external file), nothing happens! (??)
    I've saved and done multiple browser previews from inside Dreamweaver, and also tried to upload the file variations to the server to see if that made any difference, but to no avail. The second I place that piece of code externally, it presents the image above, and can't be modified.

    Hopefully some of you can figure it out, as I sure can't.
    S. Rosland

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Dunno, it looks fine in Chrome 11 on Windows 7. Just make sure there isn't something overriding your linked CSS. One thing to try is to add !important to the end of the lines in question.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Excellent!

    I did as you suggested (wrote important behind the declarations) and moved them out to the external file again. This time it worked perfect.
    That made me realize that there had to be (as you suggested) a conflicting declaration somewhere else. It turned out there was, I just hadn't looked thoroughly enough.

    Thanks!
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:02 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com