Webforumz's RSS FeedRSS Webforumz RegistrationRegister Contact Webforumz StaffContact

CSS Vertical Alignment Issues

This is a discussion on "CSS Vertical Alignment Issues" within the Web Page Design section. This forum, and the thread "CSS Vertical Alignment Issues 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 Jul 4th, 2008, 04:32
Junior Member
Join Date: Apr 2007
Location: USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
CSS Vertical Alignment Issues

Hi everyone,

Ok so here's the deal: I've basically got 2 columns inside of a container <div> that is centering the page. Thing is, when I add a large amount of content to one column (in this case the main content column) the other column is placed really low on the page instead of at the top where I want it.

Take a look at www.dougkeeling.com/new/web.html

I want it to look like the main homepage www.dougkeeling.com/new (This page is having the same issue, but there's not enough content to mess it up yet.)

As of right now I'm using one CSS file that's pretty jumbled, but I think it's decipherable. They may not be there now , but I've tried putting
Code: Select all
vertical-align:top;
about every where I could think of and it still won't work.

Any idea what I'm doing wrong?

I have to say this is a little embarassing, since I build sites for others, but the truth is, I hate CSS. Tables are bulky, but at least I always know where my stuff will be. Anyway, I thought I'd take the difficult route this time and I'm failing.

Last edited by Keeldog; Jul 4th, 2008 at 18:52.
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 Jul 4th, 2008, 18:53
Junior Member
Join Date: Apr 2007
Location: USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Vertical Alignment Issues

Never mind. I'm using a combination of CSS and one table. It may not be proper, but I truly believe that there was no way of doing what I was trying to accomplish otherwise.
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 Jul 5th, 2008, 00:59
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 155
Thanks: 0
Thanked 4 Times in 4 Posts
Re: CSS Vertical Alignment Issues

First thing I noticed is that your header div is 587 pixels high. This causes everything underneath the header to start at least 587 pixels from the top of the page. So, right outta the gate you have to position things either absolutely or relatively. Try to shorten that up a bit. Your header image is quite bit larger than the image for the body of the page. If you have the resources to re-slice your images, I would make the header image shorter and the image for the body background taller.

Item number 2.... your body content div is only 480 pixels wide while your page is 800px(I believe). That leads to a clearing issue forcing the right side content way down the page.

Here's the solution. Create a div to hold the contents of body content and column content making sure it is inside your container div and then setting the width to 100%.Then set the 2 divs inside that div setting their height to 100%, and floating them left. That will make them side by side at the same height.


Code: Select all
#content-holder {
width: 100%;
}

#content-holder #body-content {
width: 50%;
height: 100%;
float: left;
}

#content-holder #column-content {
height: 100%;
float: left;
}
Addressing those things will help you position items in your site the way you want.

Good Luck,
Scott
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 Jul 5th, 2008, 14:20
Junior Member
Join Date: Apr 2007
Location: USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Vertical Alignment Issues

Thanks Scott!

For some reason, I didn't realize you could float both columns left or right. I guess it never occurred to me. Maybe I'll give this another try now.
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 Jul 5th, 2008, 15:49
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 155
Thanks: 0
Thanked 4 Times in 4 Posts
Re: CSS Vertical Alignment Issues

Your welcome.

Good Luck
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

Tags
css, spacing, vertical align

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
Vertical alignment issues in browser; Top margins off by 50 px prescription7 Web Page Design 3 Jul 1st, 2008 05:38
Alignment Issues in FF/IE drhoctor Web Page Design 4 Jun 20th, 2008 21:14
Vertical alignment issues in IE6. IE7 Won't center my page! Itsumishi Web Page Design 5 Mar 24th, 2008 22:28
:: Dreamweaver :: Vertical Alignment LittleDoug Web Page Design 4 May 22nd, 2006 17:40
Vertical Table Alignment Amphersand Web Page Design 6 Mar 13th, 2006 02:34


All times are GMT. The time now is 18:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8