OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Container question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets and Accessibility >> Container question
Page: [1]
 
DaveX

 

Posts: 230
Joined: 5/4/2004
Status: offline

 
Container question - 8/7/2008 0:34:38   
Playing around tonight I ran into a small issue or maybe it's big. I thought I had created a container that is 900px wide. Everything was lining up ok in HTML Tools preview but when I looked at it in a browser everything was off. If I stretched the browser elements would move along with it. What I'm wondering is how to make everything I position relative to the container I made rather than the browser size. Being a rookie I thought that putting everything within the div of the container that it would stay inside the container...
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Container question - 8/7/2008 2:27:42   
Make sure the inner elements are inside the container div.
Establish the container as positioned relatively.
Establish the divs inside the container as positioned absolutely.
Here is a quick example of css absolute positioning relative to main content div:
http://www.texaswebdevelopers.com/examples/frontpagewebmaster/container_question.asp
View source and copy code for example.

(in reply to DaveX)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Container question - 8/7/2008 8:04:38   
Nooooo, unless you have a particularly complex layout there is never any need to position elements, either relatively or absolutely.

We need to see what you've done before we can advise what's causing the problem.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to TexasWebDevelopers)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Container question - 8/7/2008 9:48:31   
Hi Jaybee, I know that...it actually took me a while to do it and not create other issues. However, when someone asks for a solution it is often nice to help them solve their primary problem (even if not the perfect solution) while pointing them in the correct direction. You wouldn't give the advice to a user who's site is built in tables to switch to a CSS layout because he is having page centering issues. Since FP slaps absolutely positioned layers around as stanard operating procedure it's often easier to make lemonade out of those lemons...

(in reply to jaybee)
DaveX

 

Posts: 230
Joined: 5/4/2004
Status: offline

 
RE: Container question - 8/7/2008 18:15:08   
I'm not sure i understand the comment about not having to position elements. wouldn't that just result in all elements stacked one over the other and over to the left?

(in reply to DaveX)
TexasWebDevelopers

 

Posts: 722
Joined: 2/22/2002
From: Dallas, TX
Status: offline

 
RE: Container question - 8/7/2008 20:28:11   
It takes some planning but you create a layout that works for you.
For example, header, footer, three columns, elastic width (different from liquid or fixed widths as it uses ems and works when font sizes are re-sized).
Take the example I gave you and delete the little absolutely positioned box and you can see a header, footer, two column layout that works without absolute or relative positioning.
You float columns to the left and right. Clear the float for items like footers. Use margins to adjust horizontal and vertical elements. Use padding to keep text off of the div edges, and so on.

(in reply to DaveX)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Container question - 8/8/2008 7:46:00   

quote:

ORIGINAL: TexasWebDevelopers

However, when someone asks for a solution it is often nice to help them solve their primary problem (even if not the perfect solution) while pointing them in the correct direction. You wouldn't give the advice to a user who's site is built in tables to switch to a CSS layout because he is having page centering issues. Since FP slaps absolutely positioned layers around as stanard operating procedure it's often easier to make lemonade out of those lemons...


Yes but you haven't seen what he's done. Without that you can't tell what the issue is. Absolutely and relatively positioning elements on the page can store up some pretty horrendous problems down the line.

quote:

wouldn't that just result in all elements stacked one over the other and over to the left?


I develop sites using XHTML and CSS every day. I would say that aprroximately 1 in 20 has positioning specified in it and that's usually because I have one element that requires it for another reason such as opacity. Other than that, all elements are allowed to drop into their default position.

The only time they'll stack over each other is if you are specifying z-indexes or if you haven't specified something correctly. I believe that FP sticks z-indexes in automatically which is one reason I don't recommend FP for building css based sites. Viewing the site in IE (FP preview) also shows false positioning as IE treats floats badly at times.

If you have no z-index, have a float and specify a width you shouldn't have any problems but again we need to see what you've got so far as you don't have to specify floats on everything either.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to TexasWebDevelopers)
skip

 

Posts: 177
Joined: 12/9/2001
From: Missouri USA
Status: offline

 
RE: Container question - 8/13/2008 23:00:03   
Jaybee - I have been looking at layout info and came across this http://blog.html.it/layoutgala/ in a post by Nicole.
For study purposes, do any of these sites show good liquid layout similar to your site.


_____________________________

skip

(in reply to jaybee)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Container question - 8/14/2008 11:02:48   
NOTHING shows a good liquid layout similar to my site. Mine's a one off. :)

Hang on, I'll have a look.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to skip)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Container question - 8/14/2008 11:05:49   
OK, No1 and No2 are the closest but both of those go full page width.

To get something like my site which has space at the sides, you'd need to put their entire layout in a container that's say 85% of the page width with margins set to auto to center it.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets and Accessibility >> Container question
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts