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.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Div background fill another div?

    Hi,

    I am trying to code a site based on a design I came up with.

    http://talesotaku.com/img/Untitled-2b.jpg

    http://talesotaku.com/v2/layout.php

    Basically, I want where it says "hmmmm" to cover that whole purple section like on my design. I can't put a fixed width because the page is fluid. Then on top of that, I want to have a white section.

    I can probably figure out the curves, but can't get the colors to extend.

    Any help would be greatly appreciated. Also, sorry that my css at the top is sloppy. I'm going to organize it on any external page once I get this work. Thanks!
    Last edited by lsatblu; 12-18-2006 at 12:51 AM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Isatblu,
    To be fluid and use percentages I think you'll need to use percentages everywhere. At least inside of #content...

    Try
    Code:
    #main-left-blue {
    	margin: 0;
    	padding: 0;
    	float: left;
    	height: 500px;
                 width: 80%;
    	background: #DAE6ED;
    	}
    #main-right {
    	margin: 0;
    	padding: 0;
    	width: 20%;
    	float: right;
    	background: #6584AE url(right-bg.jpg);
    	}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That brings the color over, but my navigation on the right gets messed up. I can't figure out a way to have it look the way I want with it being fluid.

    If you stretch out your browser really wide, my items on my right nav move and the background repeats.

    Are there any other ways to go about this?

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Maybe 70/30 instead of 80/20? Hard to say...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I really wish it would be a fixed with. But just on the right. Is there no way to do that? With a percent on both sides, my right nav becomes either too large or small.
    Last edited by lsatblu; 12-18-2006 at 07:08 AM.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Something some people don't realize when they think about a fluid layout is usually only the content is fluid and the sidebar is a fixed width. Check out this example

    http://bonrouge.com/2c-hf-fluid(r).php
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New Coder
    Join Date
    Jul 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That is exactly what I was looking for. Thank you!


  •  

    Posting Permissions

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