Beginner in CSS help need with layout

This is a discussion on "Beginner in CSS help need with layout" within the Web Page Design section. This forum, and the thread "Beginner in CSS help need with layout are both part of the Design Your Website category.



 Subscribe in a reader

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

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old May 20th, 2008, 10:50
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Beginner in CSS help need with layout

Hi,

Just want to say thank you in advance for any help you may be able to provide me.

I am currently re-building my site and decided to step away from tables and get used to coding in CSS.

The link to my site is dcjetski.co.uk


What I am trying to achieve is a template that will expand/contract to the amount of content and links I have on that page. As you can see in IE the top of the page and content is OK but the footer is pushed right down the page (it gets a bit worse in firefox). I could set the page up with fixed heights and widths to bring all back together as it is, but some of the pages I want to create will have large amounts of content or I might increase the links on the left and I need the page to adjust to that. Can this be achieved with CSS?

This is the CSS location www.dcjetski.co.uk/styles/stylesheet.css

Thanks again
Attached Files
File Type: css stylesheet.css (1.2 KB, 0 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 20th, 2008, 11:44
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 438
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Beginner in CSS help need with layout

The way the content div is layed out needs some adjustments.... it should work then.

In the html change

Code: Select all
	<div id="content_head">
	</div>
	
	<div id="content_bg">
	  <p>&nbsp;</p>
	  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras a quam eu sapien elementum eleifend. Suspendisse ultrices sapien ac diam. Fusce arcu tellus, egestas eu, porta vitae, tristique nec, dui. Phasellus vel velit. Cras neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean molestie, lacus ac mattis adipiscing, magna risus imperdiet magna, eget ullamcorper arcu nulla tincidunt dolor. Vestibulum scelerisque eleifend nisi. Donec quam turpis, molestie id, consequat vel, cursus nec, massa.</p>
	  <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras a quam eu sapien elementum eleifend. Suspendisse ultrices sapien ac diam. Fusce arcu tellus, egestas eu, porta vitae, tristique nec, dui. Phasellus vel velit. Cras neque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean molestie, lacus ac mattis adipiscing, magna risus imperdiet magna, eget ullamcorper arcu nulla tincidunt dolor. Vestibulum scelerisque eleifend nisi. Donec quam turpis, molestie id, consequat vel, cursus nec, massa.</p>
	</div>
	
	
	<div id="content_footer">
	</div>
to


Code: Select all
    
   <div id="content_bg">
        <div id="content_head">
        </div>
           <p>&nbsp;</p>

           <p>Lorem ipsum dolor sit amet... </p>
          <div id="content_footer">
          </div>
    </div>


and then the css to something like...

Code: Select all
#content_head {
    position:relative;
    width:468px;
    height:9px;
    margin-top:-9px;
    background-image:url(../images/content_head.gif);
}

#content_bg {
    position:relative;
    left:211px;
    top: 180px;
    width:468px;
    margin-top:-400px;
    
    background-image:url(../mages/content_bgrd.gif);
    overflow: visible;
    
}

#content_footer {
    position:relative;
    bottom:0px;
    width:468px;
    height:12px;
    background-image:url(../images/content_foot.gif);
    
}
See if that works... if it does i'll explain what we did... if it doesn't i'll have another look at it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 20th, 2008, 13:38
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Bocaj,

Thank you so much. When i looked at your code it made sense straight away. I guess its all about nesting with CSS. Have uploaded the amended code as you recommended and i'm nearly there.

Just trying to figure out how to nest the remainder of the document so it looks right.

I am a bit puzzle though why there is a gap below the header and navigation bar in firefox but not in IE

Thanks again Bocaj.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 20th, 2008, 14:27
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Ok,

I really pickled now.

Any help would really be appreciated.

Struggling to get my head around how this css stuff works. Hopefully the more i use it the more i will get my head around it.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 20th, 2008, 14:30
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,765
Thanks: 0
Thanked 14 Times in 14 Posts
Re: Beginner in CSS help need with layout

add to the top of your CSS:


HTML: Select all
* {
margin:0;
padding:0;

}
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 20th, 2008, 15:09
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Thanks Marc,

Have done that and it gets rid of my firefox glitch. Have uploaded the page and stylesheet again. Could you point me in the right direction as to get the footer of the page in the right place????

Thanks again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old May 20th, 2008, 16:35
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 438
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Beginner in CSS help need with layout

in your css,

Code: Select all
#footer {
    position:relative;
    left:0px;
    top:458px;
    width:800px;
    height:69px;
}
Remove the

Code: Select all
top:458px;
and add


Code: Select all
   margin-left:-210px;

Nest the footer

Code: Select all
    <div id="content_footer">
    </div>
        <div id="footer">
        <img src="http://www.dcjetski.co.uk/images/index_11.gif" width="800" height="69" alt="" />
    </div>
    </div>
    

</div>
</body>
</html>

There are other ways to do it, but i think that's probably the quickest/easiest.

Last edited by Bocaj; May 20th, 2008 at 16:46.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old May 20th, 2008, 16:42
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,765
Thanks: 0
Thanked 14 Times in 14 Posts
Re: Beginner in CSS help need with layout

Why, why, why are you using absolute positioning?! This could easily be done using faux columns....
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old May 20th, 2008, 16:50
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 438
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Beginner in CSS help need with layout

Oh i just noticed in your nav section

Code: Select all
	background-image: url(../images/nav_bg.gif);
	background-repeat:repeat-y
	overflow: visible;
You've missed off the semicolan at the end of repeat-y

Other than that you css completely validates... not bad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old May 20th, 2008, 18:47
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Thanks Bocaj,

Im nearly there with it. Just need to get my nav bar to stretch with content. Other than that its startig to look like what im after. Your help has really been appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old May 20th, 2008, 18:48
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Quote:
Originally Posted by Marc View Post
Why, why, why are you using absolute positioning?! This could easily be done using faux columns....

Marc,

Sorry mate but ive never heard of faux columns. Im completly new to CSS always got by in the past by hacking tables. Will check it out though if you think its the answer to my layout.

Thanks

Darren
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old May 21st, 2008, 10:34
Junior Member
Join Date: May 2008
Location: Hove, UK
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Beginner in CSS help need with layout

Hi again,

I'm still stuck getting my nav column to stretch down/resize with my content column. Tried everything i can think off. Really struggling with CSS can anyone help??? Please???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old May 21st, 2008, 12:20
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 438
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Beginner in CSS help need with layout

Like marc said try reading through this article on FAUX COLUMNS

It's probably the easiest method to do what you need to do..

Post any questions and i will or someone else probably will try to answer them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old May 21st, 2008, 12:26
Reputable Member
Join Date: Mar 2008
Location: Chester, UK
Age: 18
Posts: 438
Thanks: 2
Thanked 29 Times in 29 Posts
Re: Beginner in CSS help need with layout

Oh yeah and i'm assuming you're using firefox,

Try this little plugin, its got dozens of useful things that you'll learn to use over time... but something beneficial to you right now would be under the CSS tab, you can edit the CSS of your page directly and look at the results without actually changing the css of your page (it's what i'm doing right now).

If that makes any sense, you can experiment with the css view it in real time without actually editing the site.

If that makes any sense, i was never any good at explaining things.... just try it and you'll see what i mean.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

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
beginner need help shinesmithdas PHP Forum 1 Jul 30th, 2007 00:41
Beginner needs help on image & caption layout badger Web Page Design 3 Jun 21st, 2007 11:32
Fluid layout - IE6 clichés the layout when resizing cyberseed Web Page Design 7 Jun 16th, 2007 05:14
The Most Versatile Layout (beginner) TheLove Web Page Design 2 Mar 24th, 2006 02:19
What makes a layout a good layout? Miles Lombardi Graphics and 3D 4 Jul 26th, 2005 03:22


All times are GMT. The time now is 10:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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