CSS Layout Questions

Advertisement
Only making baby steps in CSS still but I am learning a lot. Here's a link to the page I am trying to create: http://www3.telus.net/~jessum/details_layout.html
Here's what I have managed to create so far: http://www3.telus.net/~jessum/details.html
When explaining any steps please explain it using Dreamweaver. I will be looking in the code to see how it all works but I want to be able to get proficient using Dreamweaver so I can see how things flow etc. before I try and hand code.
Questions
1. Is it a good practice to use a "container" to hold all of the div's or is it better to start by adding a header without a container?
2. How can I centre a div in the page?
I read that to align the div so it's "centred' in the page I can use: margin: auto;
but I'm not sure how to do this. Please explain.
3. How do I remove the space around the "container"? I've set the margin and padding to: "0" but the space is still there.
Thanks
Advertisement

Replay

osgood_ wrote:
Not sure where this notion of using the body as a container came from but for years a wrapper or container was considered standard practice.
The idea is being promoted by several of the most active and knowledgeable members of this forum. I think the idea first came from Altruistic Gramps, and I remember debating the issue with him about a year ago. It has also been picked up enthusiastically by Murray, and I've seen Nancy O suggest the same idea.
I've been doing a lot of research into CSS3 recently, and discovered that the Borders and Backgrounds module specifically advises against styling the <html> element (http://www.w3.org/TR/css3-background/#special-backgrounds). It doesn't give a reason for this recommendation.
I suppose the idea of giving the body a width instead of using a container might come from the HTML5 definition of the body as representing the main content of the document (http://dev.w3.org/html5/spec/the-body-element.html#the-body-element).
I suspect that this is likely to develop into the same type of fruitless argument as we had several years ago about the "superiority" of ems over pixels. Adding a single <div> to act as the container or wrapper for the content doesn't strike me as being less efficient. It also has the advantage of avoiding styling the <html> element.

Please check css layout

Hi - posted this in the webforum but didn't show here for some reason so posting again... just doing my first all css layout and want to get the experts to check it out - tell me what could be better / anything glaringly wrong / etc etc Navigation is

CSS Layout in DW CS 3

I'm kinda wondering why the id's are preceded with a class if you open any of the premade CSS layouts in DW CS3. example: Two Columns, all widths in percent, with right sidebar header and footer. CSS: body { font: 100% Verdana, Arial, Helvetica, sans

CSS Layout problems

I should start this by saying I am very new to CSS layouts, and am self taught, so I'm probably doing something very wrong. So far I've stuck to really simple layouts and had no problems...but they were very simple layouts. With the site I'm doing at

LAYOUT QUESTIONS - CSS ISSUES

I am trying to center the three middle divs (the one with the three tabs and purple text, the one that says rotating images and the black nav - these are 3 separate divs) of the attached page so there is a green border on just the sides with white at

Quick CSS box question

Hi guys, Firstly a very Merry Christmas to you all ! I'm just getting to grips with converting all the text on my site to CSS and have a quick question. On some of my pages I add an 'Also see' links box aligned to the right - it's a CSS div tag thing

Photoshop images with spot channels in Indesign CS6 (layout question)

I've got an Indesign CS6 layout that will have a spot varnish when it goes to press. Right now I've got a layout with psd files that have spot channels in them that will be used for the spot varnish. My question is, in Indesign when I'm laying this o

Internet Sales 5.0  B2B  (e-commerce) layout question

Hi all, I'm trying to change the layout for the ISA application. I have changed the menu on the left, but it's a little to big to fit in the menu frame ... Is it possible to resize the "closer" in order to make the menuframe a little wider ? It

Book layout question due to lack of functionality in InDesign

I am a doctoral student (cancer cell biology) starting to write my dissertation (in Word 2007) and I'm using InDesign CS3 (5.0.4) for the layout (I refuse to layout figures and tables in Word... tried it... giant pain in the a$$).  My original plan w

Missing? : File- New- Blank Page- Page type (CSS)- Layout is empty!!

Hello- I am just learning Dreamweaver CS3 and I'm wondering if something has gone missing on my installation, or if this is how it's supposed to work... If I do File -> New -> Blank Page (then choose CSS in the Page Type window pane) ...  I then fin

CSS layout check

Hi all, I was wondering if a few of you would mind having a look at this code. IE7 is rednering it just as I'd like it, but Firefox is not. I'm sure I could use a different method interms of Float and Position, but I can't think of it. Any advice wou

CSS & PT Question

Hi Everyone I have several sites that I'm getting rid of some older CUCM 4.3 boxes and I have a question about CSS and PT. Currently none of the sites are connected by to a PUB & SUB setup, all the sites are independent of each other but when I remov

What controls the space above 'maincontent' in CSS layout with header?

In a freshly-downloaded CSS page layout with header (twoColHybLtHdr or similar), there is a space of about 20px between the bottom of the header box and the top of the maincontent box.   Because of this space, when a bottom border is added to the hea

Removing white line in CSS layout

Hello everyone, I'm hoping that one of you experienced lot can help out a newbie (again!) I've been getting to grips with CSS and building my layout with it instead of with tables, following the advice of some of you guys on here. It's going great so

CSS layout problems in Explorer (fine in Firefox and Safari)

Firstly apologies to the mods, I had mistakenly posted this in the dynamic section also... My problem - I am working on a CSS site (my first!) here http://www.benfrain.com It appears fine in Firefox (PC and Mac) and Safari (mac) but when I view it in

CSS update question

I had font-size = 12 as a global CSS tag. Changed to 14 but no updates of existing elements displayed. Exited app and restarted, now CSS displays as 14pt in the property sheet but obviously still really 12 pt on run. Is there a call or invalidateDisp

APEX Theme 25 - Responsive Grid Layout Question

Hi What is the best way to control an item to be positioned right next to the other item on the same row. I have a select list that I would like to have an edit button right next to it. I created two items for example: P_MY_SELECT_LIST Grid set New L

Css syntax question

sometimes a piece of css will look like this #toolbar { background-color: #313031; padding: 5px 0px 5px 0px; and sometimes it looks like this .toolbar { background-color: #313031; padding: 5px 0px 5px 0px; (note the # is replaced with a . ) is there

First fully CSS layout.

I've really enjoyed building this page, a challenge at times for a someone who's bit of a CSS toddler! I've attempted to make it expand vertically for content and accessibility with ctrl/cmd + in firefox/safari. If you see anywhere I'm going wrong, o

Form layout question

I am trying to layout a form like this. Employees Department Employee # 1234 Department # 123 Department Name ABC Employee Name Scott Department Type W SUBMIT I used the Panel form layout but I am not able group them like above with the headings? Any