css page layout help

This is a discussion on "css page layout help" within the Web Page Design section. This forum, and the thread "css page layout help are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 30th, 2007, 09:44
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
css page layout help

I have a site designed with css here
The problem I am having is using a background div. I used one here but I don't know how to get it so it changes height when the sidebar & content div's do so they don't go outside the background div like the sidebar has done.
How do I fix this?

Last edited by debrag; Aug 30th, 2007 at 11:40. Reason: updated links
Reply With Quote

  #2 (permalink)  
Old Aug 30th, 2007, 11:19
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

links no go
Reply With Quote
  #3 (permalink)  
Old Aug 30th, 2007, 11:40
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

sorry to many w's links have been updated
Reply With Quote
  #4 (permalink)  
Old Aug 30th, 2007, 11:43
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

I'm confused ... what's it suppose to look like?
Reply With Quote
  #5 (permalink)  
Old Aug 30th, 2007, 11:47
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

in the second link i have placed a div behind the content and sidebar div.
This div label 'back' doesn't change it's height so the over div's don't go out side it as the sidebar has done.
How do I change this? are these 2 div's not inside the back div?
Reply With Quote
  #6 (permalink)  
Old Aug 30th, 2007, 11:51
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

It's not a div ... it's a span. Why are you using a span?

What is suppose to be the purpose of this span?

Do you have an end result you are trying to achieve ... like a mock-up or something?
Reply With Quote
  #7 (permalink)  
Old Aug 30th, 2007, 11:51
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Quote:
Originally Posted by nate2099 View Post
can you post the css??
Just view the source!
Reply With Quote
  #8 (permalink)  
Old Aug 30th, 2007, 11:52
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

ummm. yeah, it's inline... or in the html at least...

anyways, im with you, confused.

my bed tim i think!!

Last edited by nate2099; Aug 30th, 2007 at 11:55.
Reply With Quote
  #9 (permalink)  
Old Aug 30th, 2007, 11:52
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Quote:
Originally Posted by karinne View Post
It's not a div ... it's a span. Why are you using a span?
*
What is suppose to be the purpose of this span?
*
Do you have an end result you are trying to achieve ... like a mock-up or something?
*
I set it up as a div I have no clue what a span is
Reply With Quote
  #10 (permalink)  
Old Aug 30th, 2007, 11:59
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Quote:
Originally Posted by debrag View Post
*
I set it up as a div I have no clue what a span is
This is the code you have .... way at the bottom of your document.

Code: Select all
<span id="back"></span>
So ... again ... what's suppose to be the purpose of that span? What are you trying to achieve?
Reply With Quote
  #11 (permalink)  
Old Aug 30th, 2007, 12:11
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

like this or this (many of these out there) though these use tables as well as divs are all designs like these done this way - div's inside tables?
Can't I have a 'container' div which houses all the divs - sidebar, content, header etc so this 'container' div exbands with the contents
Reply With Quote
  #12 (permalink)  
Old Aug 30th, 2007, 12:13
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Quote:
Originally Posted by karinne View Post
This is the code you have .... way at the bottom of your document.

Code: Select all
<span id="back"></span>
So ... again ... what's suppose to be the purpose of that span? What are you trying to achieve?
thats is mean to be div not span.

Acheive -
to not have the black behind the sidebar & content divs, to have it white, trying to place a div behind them but can't get one that expands with the contents to work.
Reply With Quote
  #13 (permalink)  
Old Aug 30th, 2007, 12:13
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Well yeah ... it's just a 2 column layout

Look at the sticky Resources for how to do css layout up top. There's tons of examples of layouts. Pick one and run with it Get you basic document (shell) done properly, then it's easy to add things to it.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-CA" xml:lang="EN-CA">

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

<body>

<div id="branding"> ... </div>

<div id="container">
    <div id="side"> ... </div>
    <div id="main"> ... </div>
</div>

<div id="siteinfo"> ... </div>

</body>
</html>
This would be the shell of a 2 column layout site.

Last edited by karinne; Aug 30th, 2007 at 12:17.
Reply With Quote
  #14 (permalink)  
Old Aug 30th, 2007, 12:24
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

I take it 'branding' means header

Last edited by debrag; Aug 30th, 2007 at 12:28.
Reply With Quote
  #15 (permalink)  
Old Aug 30th, 2007, 12:25
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Quote:
Originally Posted by debrag View Post
so the sidebar and content divs are next to each other with no space between them then?
Not sure what you mean by this.

Quote:
Originally Posted by debrag View Post
I take it 'branding' means header
Yes ... branding is a much better word for header ... after all ... that is what you put in there
Reply With Quote
  #16 (permalink)  
Old Aug 30th, 2007, 12:40
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Below is my code, the red parts are as follows:
'branding' = header
'container' = back
'side' = sidebar
'main' = contents

going to www.libbytanner.diva-host.com/index1.php shows no change the side bar is still over the back(container) div.
Have I closed the divs correctly?

Code: Select all
 
<body>
 
<div id="header"><img src="insomniacbg23a.jpg" alt="header" width="881" height="350" border="0" usemap="#Map" />
 
<map name="Map" id="Map"><area shape="rect" coords="15,187,63,207" href="index.php" alt="home" />
 
<area shape="rect" coords="79,189,127,207" href="libby.php" alt="libby" />
 
<area shape="rect" coords="143,187,218,211" href="interactive.php" alt="interact" />
 
<area shape="rect" coords="226,212,279,230" href="media.php" alt="media" />
 
<area shape="rect" coords="296,212,332,229" href="web.php" alt="web" />
 
</map></div>
<div id="back">
 
<div id="sidebar">
 
  <div class="headline">LATEST Projects </div>
 
  <div align="left">
 
    <div align="left">
 
      <div align="center">
 
        <div align="left">
 
          <p align="center"><img 
 
            src="6i.jpg" alt="1" 
 
            width="55" height="77" align="left" /> <b>BlackJack: At the Gates<br />
 
            </b>As: Stephanie Turner<br />
 
            Release: 24 September 2006 (Australia)<br />
 
            Format: TV<br />
 
            Info: <a 
 
            href="http://www.blackchristmas.com/">official site</a> <br />
 
          </p>
 
          <p align="right">[Past projects]<br />
 
          </p>
 
        </div>
 
      </div>
 
    </div>
 
  </div>
 
  <div class="headline">SCHEDULE</div>
 
  <div align="center"><br />
 
      <div align="center"><img 
 
            src="flayguk.jpg" alt="1" 
 
            width="60" height="43" align="left" /> <b><U>All Saints</U><br />
 
        </b>As: Bronwyn Craig <br />
 
        Channel: BBC1 (mon-fri)<br />
 
        Times: 2:35pm - 3:20pm <br />
 
        <br />
 
        &nbsp; </div>
 
  </div>
 
  <div class="headline">LATEST  IMAGES</div>
 
  <p align="center"><?php
 
  include "./gallery/cpmfetch/cpmfetch.php";
 
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
 
  $objCpm->cpm_viewLastAddedMedia(1,2);
 
  $objCpm->cpm_close();
 
?>
 
<br />
 
    &nbsp;
 
    <!-- BEGIN CBOX - http://www.cbox.ws -->
 
  </p>
 
  <div class="headline">RANDOM IMAGES</div><br />
 
  <!-- END CBOX -->
 
  </p>
 
  </p>
 
  </p>
 
  <div class="headline">SITE DETAILS</div>
 
  <div align="center">Owned by:Debra<br />
 
    Host: diva-host.com<br />
 
    Opened Since: 2007<br />
 
    <!--WEBBOT bot="Script" startspan PREVIEW="Site Meter" -->
 
    <br />
 
    </p>
 
  </div>
 
  <div class="headline">SISTER SITES</div>
 
  <p align="center">Helen Dallimore<a target="_blank" href="http://sarah-fan.com"><br />
 
    </a>Emily Symons<br />
 
    Maura Tierney<br />
 
    Julianna margulies<br />
 
    daphne zuniga</p>
 
  <div class="headline">SHOP FOR libby</div>
 
  <div align="center"><a href="http://www.qksrv.net/click-479223-5463217?loc=http%3A//search-desc.ebay.com/search/search.dll?MfcISAPICommand=GetResult&amp;SortProperty=Metahttp://search-desc.ebay.com/search/search.dll?sofocus=bs&amp;sbrftog=1&amp;from=R10&amp;_trksid=m37&amp;satitle=libby+tanner&amp;sacat=-1%26catref%3DC6&amp;fts=2&amp;sargn=-1%26saslc%3D2&amp;sadis=200&amp;fpos=ZIP%2FPostal&amp;sabfmts=1&amp;saobfmts=insif&amp;ftrt=1&amp;ftrv=1&amp;saprclo=&amp;saprchi=&amp;fsop=1&amp;fsoo=1" target="_blank">EBAY</a><br />
 
    &nbsp;<a/></a></a></a> </div>
 
  <div class="headline">Design &amp; Coding</div>
 
  <div align="center">Designed and coded by me</div>
 
</div>
 
<div id="content">
 
  <div class="headline">
 
    <div align="center">NEWS</div>
 
  </div>
 
  <div align="center">
 
    <p><?PHP
 
$number=10;
 
include("/home/divatcom/public_html/libbytanner/news/show_news.php");
 
?>&nbsp;</p>
 
  </div>
 
</div>
 
</div>
 
</body>
css for id back:

#back {
position:absolute;
width:880px;
heightx;
z-index:0;
left: 11px;
top: 23px;
background-color: #FFFFFF;

Last edited by debrag; Aug 30th, 2007 at 12:47.
Reply With Quote
  #17 (permalink)  
Old Aug 30th, 2007, 12:51
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

If you want to use positioning, position: relative; is the one you should be using for this ... not absolute.

z-index here is not needed.

So ... if I have this straight, you want the black background around your content. And the content should be white.
Reply With Quote
  #18 (permalink)  
Old Aug 30th, 2007, 13:00
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

Code: Select all
#back {
 position:relative;
 width:880px;
 height:px;
 left: 11px;
 top: 23px;
 background-color: #FFFFFF;
results - whole section has moved!
www.libbytanner.diva-host.com/index1.php

and no I want 'container' to be white which it currently is.

Last edited by Daniel; Aug 30th, 2007 at 13:07. Reason: [code] tags added
Reply With Quote
  #19 (permalink)  
Old Aug 30th, 2007, 13:17
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

hmm ... yes ... that's what I said

try removing the top: 23px;
Reply With Quote
  #20 (permalink)  
Old Aug 30th, 2007, 13:23
Junior Member
Join Date: Feb 2007
Location: london
Age: 26
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: css page layout help

doing that makes it worse
Reply With Quote
Reply

Tags
css, div

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Layout for a links page Zonglars Graphics and 3D 12 Jul 22nd, 2007 06:03
Help needed with page layout Bhavana2001 Starting Out 1 Mar 9th, 2007 14:36
page layout newbie2007 Website Planning 4 Mar 6th, 2007 13:40
Please check page layout in PC IE Pixelate Graphics and 3D 2 May 10th, 2006 09:45
$250 for site layout (1 page) fireflya Job Opportunities 1 Sep 9th, 2005 21:13


All times are GMT. The time now is 16:09.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43