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 2 1 2 LastLast
Results 1 to 10 of 19

Thread:

  1. #1
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    I have a major problem working with DIVs. The only thing I'm trying to do is create a header on a page, using a sliced image as the header. I get the header in place, but all of the content that should be below the header is underneath the header. This is my biggest hurdle when working with HTML & CSS. Any suggestions?
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Quote Originally Posted by BallardStudio, post: 227497
    I have a major problem working with DIVs. The only thing I'm trying to do is create a header on a page, using a sliced image as the header. I get the header in place, but all of the content that should be below the header is underneath the header. This is my biggest hurdle when working with HTML & CSS. Any suggestions?
    Can you post a link? It's easier if we can see the code...
    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 Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    If you don't have the page up where it can be seen, you could post your HTML and CSS code here, as AM said, it would be easier to answer if we could see the code.

  5. #4
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    Here's a link
    http://www.ballardstudio.com/Test.html
    The HTML is below.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Test</title>
    <link rel="stylesheet" type="text/css" href="banner.css" />
    <style>
    body {
        background-image: url(images/blacknoise.jpg);
    }
    </style>
    </head>
    <div id="wrapper">
    <div id="Table_01">
        <div id="Ballard-Studio-Banner-Test-01">
          <img src="images/images/Ballard-Studio-Banner-Test_01.png" width="521" height="1" alt="">
        </div>
        <div id="ballard-studio-home">
            <a href="http://www.ballardstudio.com/index.html">
                <img src="images/images/ballard_studio_home.png" width="82" height="40" border="0" alt="Ballard Studio Home"></a>
        </div>
        <div id="Ballard-Studio-Banner-Test-03">
            <img src="images/images/Ballard-Studio-Banner-Test_03.png" width="1" height="258" alt="">
        </div>
        <div id="studio-info">
            <a href="http://www.ballardstudio.com/about-me.html">
                <img src="images/images/studio_info.png" width="121" height="41" border="0" alt="Ballard Studio Info"></a>
        </div>
        <div id="Ballard-Studio-Banner-Test-05">
            <img src="images/images/Ballard-Studio-Banner-Test_05.png" width="1" height="258" alt="">
        </div>
        <div id="ballardstudio-portfolio">
            <a href="http://www.ballardstudio.com/ballard_studio_portfolio.html">
                <img src="images/images/ballardstudio_portfolio.png" width="110" height="43" border="0" alt="Ballard Studio Portfolio"></a>
        </div>
        <div id="Ballard-Studio-Banner-Test-07">
            <img src="images/images/Ballard-Studio-Banner-Test_07.png" width="1" height="258" alt="">
        </div>
        <div id="ballard-studio-contact">
            <a href="http://www.ballardstudio.com/contactsb.html">
                <img src="images/images/ballard_studio_contact.png" width="91" height="41" border="0" alt="Contact Ballard Studio"></a>
        </div>
        <div id="Ballard-Studio-Banner-Test-09">
            <img src="images/images/Ballard-Studio-Banner-Test_09.png" width="32" height="258" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-10">
            <img src="images/images/Ballard-Studio-Banner-Test_10.png" width="1" height="257" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-11">
            <img src="images/images/Ballard-Studio-Banner-Test_11.png" width="369" height="39" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-12">
            <img src="images/images/Ballard-Studio-Banner-Test_12.png" width="151" height="257" alt="">
        </div>
        <div id="ballard-studio-logo">
            <a href="http://www.ballardstudio.com">
                <img src="images/images/ballard_studio_logo.png" width="369" height="34" border="0" alt="Ballard Studio Website Home"></a>
        </div>
        <div id="Ballard-Studio-Banner-Test-14">
            <img src="images/images/Ballard-Studio-Banner-Test_14.png" width="82" height="218" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-15">
            <img src="images/images/Ballard-Studio-Banner-Test_15.png" width="121" height="217" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-16">
            <img src="images/images/Ballard-Studio-Banner-Test_16.png" width="91" height="217" alt="">
        </div>
        <div id="Ballard-Studio-Banner-Test-17">
            <img src="images/images/Ballard-Studio-Banner-Test_17.png" width="110" height="215" alt="">
        </div>
        <div id="ballard-studio-logo018">
            <a href="http://www.ballardstudio.com">
                <img src="images/images/ballard_studio_logo-18.png" width="369" height="72" border="0" alt="Ballard Studio Home"></a>
        </div>
        <div id="ballard-studio-logo019">
            <a href="http://www.ballardstudio.com">
                <img src="images/images/ballard_studio_logo-19.png" width="369" height="112" border="0" alt="Ballard Studio Website Home"></a>
        </div>
    </div>
    <body>
    </body>
    </html>
    Here's the CSS
    Code:
    @charset "UTF-8";
    /* CSS Document */
    
    div#wrapper { width:960px; margin:auto; position:relative; padding:0px; }
    
    /*Begin new header*/
    
    #Table_01 {
        position:absolute;
        left:0px;
        top:0px;
        width:960px;
        height:258px;
    }
    
    #Ballard-Studio-Banner-Test-01 {
        position:absolute;
        left:0px;
        top:0px;
        width:521px;
        height:1px;
    }
    
    #ballard-studio-home {
        position:absolute;
        left:521px;
        top:0px;
        width:82px;
        height:40px;
    }
    
    #Ballard-Studio-Banner-Test-03 {
        position:absolute;
        left:603px;
        top:0px;
        width:1px;
        height:258px;
    }
    
    #studio-info {
        position:absolute;
        left:604px;
        top:0px;
        width:121px;
        height:41px;
    }
    
    #Ballard-Studio-Banner-Test-05 {
        position:absolute;
        left:725px;
        top:0px;
        width:1px;
        height:258px;
    }
    
    #ballardstudio-portfolio {
        position:absolute;
        left:726px;
        top:0px;
        width:110px;
        height:43px;
    }
    
    #Ballard-Studio-Banner-Test-07 {
        position:absolute;
        left:836px;
        top:0px;
        width:1px;
        height:258px;
    }
    
    #ballard-studio-contact {
        position:absolute;
        left:837px;
        top:0px;
        width:91px;
        height:41px;
    }
    
    #Ballard-Studio-Banner-Test-09 {
        position:absolute;
        left:928px;
        top:0px;
        width:32px;
        height:258px;
    }
    
    #Ballard-Studio-Banner-Test-10 {
        position:absolute;
        left:0px;
        top:1px;
        width:1px;
        height:257px;
    }
    
    #Ballard-Studio-Banner-Test-11 {
        position:absolute;
        left:1px;
        top:1px;
        width:369px;
        height:39px;
    }
    
    #Ballard-Studio-Banner-Test-12 {
        position:absolute;
        left:370px;
        top:1px;
        width:151px;
        height:257px;
    }
    
    #ballard-studio-logo {
        position:absolute;
        left:1px;
        top:40px;
        width:369px;
        height:34px;
    }
    
    #Ballard-Studio-Banner-Test-14 {
        position:absolute;
        left:521px;
        top:40px;
        width:82px;
        height:218px;
    }
    
    #Ballard-Studio-Banner-Test-15 {
        position:absolute;
        left:604px;
        top:41px;
        width:121px;
        height:217px;
    }
    
    #Ballard-Studio-Banner-Test-16 {
        position:absolute;
        left:837px;
        top:41px;
        width:91px;
        height:217px;
    }
    
    #Ballard-Studio-Banner-Test-17 {
        position:absolute;
        left:726px;
        top:43px;
        width:110px;
        height:215px;
    }
    
    #ballard-studio-logo018 {
        position:absolute;
        left:1px;
        top:74px;
        width:369px;
        height:72px;
    }
    
    #ballard-studio-logo019 {
        position:absolute;
        left:1px;
        top:146px;
        width:369px;
        height:112px;
    }
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Wow. Why do you have so many divs? I'd use one for a container, and inside that I'd have one called header, with one for the logo, one for the nav with a <ul> inside it, and one for the torn line image(all in one image, not sliced as you have it now). Then it will be easy to position them all.

    Code:
    <html>
    <body>
    
    <div id="container">
    
      <div id="header">
      <div id="logo"
        img src="logo-18.png"
      </div><!-- close logo -->
    
      <div id="navigation">
        <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Studio Info</a></li>
        <li><a href="#">Portfolio</a></li>
        <li><a href="#">Contact</a></li>
        </ul>
      </div><!-- close navigation -->
    
      <div id="divider">
        img src="tornline.jpg">
      </div><!-- close divider -->
    </div><!-- close header -->
    
    <div id="mainContent">
      Put the main content of the page here
      </div><!-- close mainContent -->
    
    </div><!-- close container -->
    
    </body>
    </html>
    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!

  7. #6
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    This is what I get for using Photoshop to include both HTML and CSS. I'm an art director focusing mainly on graphic design, so when it comes to coding, I do have stumbling blocks here and there. Photoshop does some of the work, but I know I can't trust it. DIVs in general are simple in terms, but I have a problem with understanding how they work with coding and layout.
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  8. #7
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Quote Originally Posted by BallardStudio, post: 227517
    This is what I get for using Photoshop to include both HTML and CSS. I'm an art director focusing mainly on graphic design, so when it comes to coding, I do have stumbling blocks here and there. Photoshop does some of the work, but I know I can't trust it. DIVs in general are simple in terms, but I have a problem with understanding how they work with coding and layout.
    You're right - Photoshop does a really crappy job of anything that pertains to coding - I'm not even happy with the way it slices images - I tend to do that myself in layered groups, etc.

    Have you ever coded in tables? Divs are somewhat like that, in that you can nest them, but much more flexible in positioning and styling.

    I'm doing Christmas Eve stuff in a few minutes, but later on I'll see if I can give you some CSS to go with what I posted before.
    canuck.gif
    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!

  9. #8
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Could you show me what exactly you're wanting it to look like? Looking at it in Chrome, it looks fine, or maybe it doesn't, but it doesn't look like there's anything necessarily wrong with it. I know that was confusing, but either way, I don't see what's wrong about it.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  10. #9
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    As far as the divs go, you really only need this xhtml to accomplish what you have there:
    HTML Code:
    <div class="header">
    <img class="logo" src="images/images/ballard_studio_logo-18.png" />
    <ul class="nav">
    <li><a href="http://www.ballardstudio.com/index.html">Home</a></li>
    <li><a href="http://www.ballardstudio.com/about-me.html">Studio Info</a></li>
    <li><a href="http://www.ballardstudio.com/ballard_studio_portfolio.html">Portfolio</a></li>
    <li><a href="http://www.ballardstudio.com/contactsb.html">Contact</a></li>
    </ul>
    </div>
    The rest is simple relative positioned CSS.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  11. #10
    WDF Staff m3n0tu18's Avatar
    Join Date
    Jul 2011
    Location
    Devon, UK
    Posts
    1,473
    Member #
    28473
    Liked
    265 times
    also dont use _ in #div or .class, it can only cause you no end of trouble. Use - or dont use anything with a space.
    If you like my comments to your thread please click the LIKE button

    Check out my portfolio: Here!
    View my company Facebook Page
    View my company Website

    <<Plrease ignoer my typo's I have isdexlyia>>


Page 1 of 2 1 2 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:36 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com