I am ready for help on the next step of my site. Wrappers and containers are confusing to me. I need to have the site centered and when the browser is minimized all the background images still show properly when I use the bottom scroll bar. I know this is achieved by wrappers and containers but I am not sure what to put in these or if both are required. My current site is www.foxdenwebsolutions.com which is done in Flash so I need the content to look the same on all pages but the portfolio page...I am completely changing that one. Any help with these elements would be greatly appreciated.

markbrown4
—
2010-01-30T04:58:17Z —
#2

Hi,

All you need to center a block level element horizontally is a width and left and right margins of auto.

Yes, thanks mark. So I don't need to use containers as well? If someone could explain what a wrapper and a container are, maybe I will understand their use better.

RyanReese
—
2010-01-30T05:26:48Z —
#4

Wrapper and container are interchangeable words. It just is a container/wrapper of something :). Normally columns (that's where the word is used most but it c an be used anywhere)

PaulOB
—
2010-01-30T11:29:46Z —
#5

As Ryan said wrapper, container , outer etc are just words and nothing to do with css/html It's just a common way of describing "an element" (usually a div) that will contain many elements.

Most people use the above words to mean a page-wrapper that holds all the content on the page and therefore centring all the page content by centring that one element instead of centring every element on the page in some way.

Divs are used to create divisions of content and to organise,structure and control your page more easily. Many times you may have multiple elements in the same context (such as floated column content) and then you wrap the content in a div to control all the children more easily.

When someone says "add a wrapper" then that just mean contain those elements within a parent (usually a div) and it will make things easier to control and to address.

For the future html5 does introduce some new elements for grouping content such as "section". There's a short article here about naming conventions that you might find useful.

cgacfox
—
2010-01-30T20:55:58Z —
#6

Thank you Paul for your explanation. It is much appreciated.

I have added a page container so everything is centered now. I have changed the header to include all elements in it (i.e. logo, and text image as well as the background image). I got the footer text the way I want it. My husband (software and web QA guy) wanted the background of the page not to contain the textured background as he said it was distracting so I just have the background texture in the container and the background page colored to match but not be distracting.

Now I am working on adding content. If you go to my current website www.foxdenwebsolutions.com (Flash site) I have text in the upper left content area, then next to it have an image. Below the upper left text is another image and next to that is more text. I want to keep this layout in CSS and HTML. I figured I would have to use containers for this as well. Am I correct or is there another way to get the layout I want?

markbrown4
—
2010-01-30T21:35:12Z —
#7

Hi,

Something like this will work for aligning media to one side and content on the other:

You give the wrapper padding to the side to prevent the text from going over and then drag the image out to the side with a negative margin. The clear property makes sure that each media block is below the floated images above.

This is just one way to achieve it, there are many.Another more popular way to do it would be to use margin on the text because the float will sit on top of the margin:

I tried to work with Mark's examples but could not get things to work the way I wanted. I had to add blank lines to get the bottom text and image to not interfere with the footer text. I have attached a mockup showing 4 equal boxes within the middle div. They need to expand or contract depending on the amount of text or size of image and not interfere with the footer. I tried setting up 4 separate containers but it didn't work right...I probably didn't do it right. Is there any way to do what I am trying to do? Also this format needs to change for every page since I have different amounts of text and images on them. Maybe setting up the content area as 2 column?

cgacfox
—
2010-02-06T19:01:57Z —
#9

I think I did it. Go to www.foxdenwebsolutions.com/CSS_site/index.html. I set up 2 columns and have the upper left text and lower left image in left column and upper right image and lower right text in right column. Now I have to test if I can have more text or larger images and it will still work.

Just tested in Firefox and it doesn't work. IE8 handles it fine but not Firefox...ok need advice.

cgacfox
—
2010-02-06T19:19:14Z —
#10

IE 7 also renders it correctly but Safari does not. I don't have margins or padding set...not sure that will help.

cgacfox
—
2010-02-06T19:46:24Z —
#11

Just checked my how my code is rendering in browsers through DW CS4 and it says I have an expanding box problem. I added overflow:hidden but that didn't work either. However, it did clear the error!

cgacfox
—
2010-02-06T19:56:22Z —
#12

I added overflow:hidden to the incorrect element. I originally put it in the left_content and right_content elements and it didn't work. I added it to the content_mdl and now it works. YAY!!!

RyanReese
—
2010-02-06T19:59:53Z —
#13

Sorry we weren't able to assist you (your thread was the last one on my tab lol) but I'm glad you found a solution for yourself :).

cgacfox
—
2010-02-06T20:08:13Z —
#14

Thanks Ryan...sometimes just posting here helps me figure things out on my own. I hope it also helps others with similar problems.

cgacfox
—
2010-02-19T20:21:00Z —
#15

I just wanted to let everyone know that my new site is finished and I wanted to thank all that helped me with all the little details that I was having problems with. You can view the site at www.foxdenwebsolutions.com. Again thanks to everyone that helped me out!

RyanReese
—
2010-02-19T22:30:58Z —
#16

If you want you can go to the reviews section of htis forum to get it reviewed by professionals :tup: