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.

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 37
  1. #1
    Senior Member Blackhawk095's Avatar
    Join Date
    May 2011
    Location
    Kentucky (USA)
    Posts
    384
    Member #
    27969
    Liked
    45 times
    I started out using tables when first learning web design. I know that divs are the better way to go so I'm trying to move toward using those more.

    I'm working on a new website that is div based. I'm having a few issues. I have a wrapper, with a header, horizontal nav area, left nav area, a footer, and the main content area. For some reason, the main content area isn't working correctly.

    Please look at my code and tell me what I need to do to fix it. I color coded the divs to make it visually easier to see what is what. Feel free to add any online resources that could assist me with learning about the use of divs and css.

    Here is my code:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>MSHS TSA HOME</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    <!--
    body {
        background-color: #333;
        background-image:  url(../../Graphics/BG_Image.png);
        background-repeat: repeat-x;
    }
    
    div#wrapper{
        width: 80%;
        margin: 0px auto;
        text-align: left;
        padding: 0px;
        height: auto;
        position: absolute;
        top: 0px;
        border: 1px solid #ff0000;
    }
    
    div#header {
        margin-top: 0px;
        background-image:url(../../Graphics/TSA_Header.png);
        background-repeat:no-repeat;
        height: 150px;
        width: 900px;
    }
    
    div#horizontal_nav {
        height: 30px;
        width: 100%;
        border-top: 1px solid #ffffff;
        border-bottom: 1px solid #ffffff;
        background-color: #339999;
    }
    
    div#left_nav {
        width: 15%;
        height:550px;
        margin-top: 0px;
        float: left;
        border-right: 1px solid #ffffff;
        background-color:#000033;
    }
    
    div#main {
        width: 100%;
        height: inherit;
        background-color: #990000;
        float: right;
        border: 1px solid #ff6600;
    
    }
    
    div#footer {
        height: 25px;
        clear: both;
        border: 1px solid #ffffff;
        background-color:#006600;
    }
    
    a:link {
        text-decoration: none;
    }
    a:visited {
        text-decoration: none;
    }
    a:hover {
        text-decoration: underline;
        color: FF6600;
    }
    a:active {
        text-decoration: none;
    }
    -->
    </style>
    </head>
    
    <body>
    <!----------------------- WRAPPER ----------------------->
    <div id="wrapper">
    <!-- HEADER -->
    <div id="header">
    
    </div>
    <!-- END OF HEADER -->
    
    <!-- HORIZONTAL NAV -->
    <div id="horizontal_nav">
    
    </div>
    <!-- END HORIZONTAL NAV -->
    
    <!-- LEFT NAV -->
    <div id="left_nav">
        nav
    </div>
    <!-- END OF LEFT NAV -->
    
    <!-- MAIN CONTENT AREA -->
    <div id="main">
    
    </div>
    <!-- END MAIN CONTECT AREA -->
    
    <!-- FOOTER -->
    <div id="footer">
    Madison Southern High school
    </div>
    
    </div>
    <!----------------------- END OF WRAPPER ----------------------->
    
    </body>
    </html>
    [COLOR=rgb(0, 51, 102)]Student Web Designer[/COLOR]
    [COLOR=rgb(0, 51, 102)]If you thought something I said was helpful. LIKE IT![/COLOR]

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    In what way is the main content area not working correctly?
    Be as specific as you can so we can try to help.
    I have taken the liberty of posting your code (modified only by separating the CSS into a linked external file, so it'll be easier to tweak) at http://www.digitalinsite.ca/developm...ums/BlackHawk/
    If this is a problem for you, let me know and I'll remove the link.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Senior Member Blackhawk095's Avatar
    Join Date
    May 2011
    Location
    Kentucky (USA)
    Posts
    384
    Member #
    27969
    Liked
    45 times
    If you look at the code, you can see every part of the page but the main content area (div id="main"). I want it to float right (It's supposed to be in that large grey area). I have tried everything to fix it, but I can't seem to get it into that area.

    I want the content area to fill that whole grey area by the left nav.

    I also want the div wrapper to be aligned in the center.
    [COLOR=rgb(0, 51, 102)]Student Web Designer[/COLOR]
    [COLOR=rgb(0, 51, 102)]If you thought something I said was helpful. LIKE IT![/COLOR]

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    There's nothing in your main div. What happens when you put content into it?

    Upload it somewhere and post a link.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member Blackhawk095's Avatar
    Join Date
    May 2011
    Location
    Kentucky (USA)
    Posts
    384
    Member #
    27969
    Liked
    45 times
    The code is just the layout of the website. That's why I don't have any content and everything is colored really weird. This website is also for my school, so I can't post it, BUT....

    AlphaMare was able to post it and has a link in his/her post.
    [COLOR=rgb(0, 51, 102)]Student Web Designer[/COLOR]
    [COLOR=rgb(0, 51, 102)]If you thought something I said was helpful. LIKE IT![/COLOR]

  7. #6
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    "Her", thanks.
    I'm gonna put in some stuff just to see what's what...
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  8. #7
    Senior Member Blackhawk095's Avatar
    Join Date
    May 2011
    Location
    Kentucky (USA)
    Posts
    384
    Member #
    27969
    Liked
    45 times
    ok. thanks
    [COLOR=rgb(0, 51, 102)]Student Web Designer[/COLOR]
    [COLOR=rgb(0, 51, 102)]If you thought something I said was helpful. LIKE IT![/COLOR]

  9. #8
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    65% + 15% != 100%. That's why it doesn't fill the area.
    phillihp likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  10. #9
    Senior Member Blackhawk095's Avatar
    Join Date
    May 2011
    Location
    Kentucky (USA)
    Posts
    384
    Member #
    27969
    Liked
    45 times
    I'm not editing the code, AlphaMare is. And by the looks of it, I think she just fixed it.
    [COLOR=rgb(0, 51, 102)]Student Web Designer[/COLOR]
    [COLOR=rgb(0, 51, 102)]If you thought something I said was helpful. LIKE IT![/COLOR]

  11. #10
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Check it now - fiddled with the CSS.
    Are you married to the borders for the divs? If you need the borders for your design, the percentages don't work out for the left-nav and the main content.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Page 1 of 4 1 2 3 ... LastLast

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 10:43 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com