473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Three column help for a beginner!

Hi

I'm trying to design a simple three-column website using html and an external stylesheet.

I have a header of 750px wide, navbar underneath is the same width, both centred.

Now I want to put three columns underneath (left and right 150px wide; middle to fit the remaining space), lined up with the left and right edges of the header/navbar. At the bottom, I want to add a footer right across to match the navbar.

I've just realised that I can't easily position the left and right columns on the page because I don't know how big the viewer's screen will be, so can't say what margin size should be.

There must be a way of lining everything up.

Any advice?

Ta.
Feb 15 '07 #1
12 2127
Ganon11
3,652 Expert 2GB
I'm moving this thread to the HTML forum.

There should be some variables that will let you access the current screen width/height. Using this, you can say 1 column will take up 33% of the width, so position them at 0% of the width, 33% of the width, and 66% of the width to get even spacing. From there, you can adjust to see what looks good.

The website will access the current screen based on who is accessing, so it will always take up a proportional amount of space.
Feb 15 '07 #2
AricC
1,892 Expert 1GB
Do you have any code written? We generally don't write that much code for people here is a link if you are interested in learning HTML.

Aric
Feb 15 '07 #3
Do you have any code written? We generally don't write that much code for people here is a link if you are interested in learning HTML.

Aric
Yeah, I've started writing the code but I think I need to know the best way to go about making the layout before doing too much. I don't want anyone to write the code for me - just point me in the right direction.

I guess what I want is something that will display more or less full screen on 800 wide monitor, and will display same width but with bigger margins left and right on a bigger monitor.

To keep the content (although possibly not the header) displaying OK in a smaller window, I was planning to make the middle column flexible size (using 100% I guess) to fill the gap available, and the left and right columns fixed width. What I'm stuck on is how to go about positioning the L and R columns.

I've read about "containers" in css stylesheets but haven't found a tutorial that covers what I want to know yet. I'm guessing that it's possible to make a centred, 750px wide container and stick all the other elements into it, keeping it all nicely lined up. That's what I'm hoping anyway!

The idea of finding out the screen size and working on percentages from there sounds great - is there a piece of code I can put in to find this? But will it work if someone opens a smaller window on their desktop?

Cheers

Genny
Feb 15 '07 #4
Just found this, which looks like it might be the answer!

guide-to-three-column-layouts

Will go and try it out.

Genny
Feb 15 '07 #5
drhowarddrfine
7,435 Expert 4TB
That link doesn't work. Please fix it. (Edit: Fixed)

There are a lot of three column examples around.
Feb 15 '07 #6
Ganon11
3,652 Expert 2GB
Just found this, which looks like it might be the answer!

guide-to-three-column-layouts

Will go and try it out.

Genny
There was a simple typing error. This should be a functional link.
Feb 16 '07 #7
Sorry for posting a bad link.

Here's where I'm up to. I've been messing about with Holly & John's Source Ordered Columns and have managed to create something with header, navbar, three columns of the widths I wanted and a footer, all using percentages for widths so that it will hopefully shrink and stretch to size.

It's going well... so far... except for the lengths of the three columns. The middle one isn't a problem because I've made it the same colour as the background, but the right and left columns are a different colour and I'd really like it if they reached the footer, irrespective of how much content is in them (there will always be some).

All the containers are floating and the first two columns are enclosed in a wrapper as per Holly & John's instructions.

Any suggestions would be much appreciated, or pointers to where I can find this information.

Many thanks

Genny
Feb 16 '07 #8
drhowarddrfine
7,435 Expert 4TB
Faux Columns

A lot of people like this method but I've never used it. There are other things that can be done but I don't have an example or link right now.
Feb 16 '07 #9
I've managed to put what I've done so far up here
Think that this is a place anyone can go and look.

Left-hand column is still too short (only tested in firefox so far), and various attempts to sort it out (height percentages and repeat-y backgrounds) don't seem to have had the desired effect.

Genny
Feb 16 '07 #10
drhowarddrfine
7,435 Expert 4TB
Well, the right column is not in the same div as the other two; or do you need it that way? Not that it solves the problem but it's the only reference the other two would have.
Feb 16 '07 #11
Well, the right column is not in the same div as the other two; or do you need it that way? Not that it solves the problem but it's the only reference the other two would have.
I think john and holly's instructions were to set it up that way - make the container a percentage of the whole width and float it left; float the middle column in the right hand side of that; float the left column in the left hand side and then add the right column in the empty space on the right. Dunno why.

If I make the containing div 100% wide, I wonder if I can float all three columns in it and will that solve the problem?
Feb 16 '07 #12
AricC
1,892 Expert 1GB
If I make the containing div 100% wide, I wonder if I can float all three columns in it and will that solve the problem?
What do you mean float the columns?
Feb 16 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: NA | last post by:
Is it possible to have adjustable tables (not Access tables per se) but those in Ms Word or Excel based on nexted forms three deep? In other words, if I have a main form, Repair History, both the...
1
by: Buddy | last post by:
Hello, Does anyone know how I can tell the ListView NOT to display the three dots when it thinks the text will not fit in the column. E.g. 'Hello World' will be displayed as 'Hello...' if the...
3
by: VMI | last post by:
I'm currently using the dataAdapter.Fill method to fill my dataset with data from an Access DB. My dataset will contain a table with three fields from Access. In my datagrid (for user...
2
by: Ravikanth[MVP] | last post by:
Hi asp:DataGrid id="YourID" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="Sample Column"> <ItemTemplate> <asp:Hyperlink runat="server" Text='<%...
0
by: Q. John Chen | last post by:
I have three checkBoxList on a page. Each has three column. The problem I have is that the COLUMN WIDTHs are dynamic based on the text. I wanted make the column width all same so they aligned...
2
by: dbasch | last post by:
Hello all, I am trying my best to create a three column form using CSS but am having no luck. It looks fine in Firefox but is mangled in IE. Here is my best attempt: <style type="text/css">...
0
by: Mike | last post by:
Hey everyone... I've got three problems with a custom DataGridView column I've built following the "How To: Host Controls in Windows Forms DataGridView Cells" article. The base editing control...
1
Death Slaught
by: Death Slaught | last post by:
I will be showing you how to make a very simple but effective three column layout. First we will begin with the HTML, or structure, of our three column layout. <!DOCTYPE html PUBLIC...
4
LoanB
by: LoanB | last post by:
Hi gang, Im busy writing my firs Windows Mobile 6 Application. - I'm a beginner ok. My first problem: When I run the app through the emulator I get an error: Database file cannot be found. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.