justaguynpc
04-19-2011, 02:39 PM
I am currently working on a web site that consists of multiple pages.
I have chosen to use a single external style sheet (CSS) for the ease of making changes later, as necessary.
For uniformity sake, the header, main-navigation, main-sidebar, main-content areas and footer will remain unchanged "positioning-wise" and "styling-wise" across the web site. My approach to this point has been to give these divs the same id for each corresponding page, i.e. mainContent, mainNav, mainSidebar for ease of styling. The only divs I have been focused on to this point has been the mainContent div and a couple of the divs where content changes from page to page. I have had no problem with the positioning of the mainNav, mainSidebar, or footer as I have not begun filling them with content.
Through adding other divs (images / text) which will change from page to page, I have found myself needing to "tweak" the positioning of mainContent naturally resulting in inconsistency in positioning between pages. I should have realized this was going to happen, but I am learning as I go.
Now that I have identified my error, what is the best approach to correct my positioning issues?
Should I go back and change the id's to these divs so as they will be unique to the page on which they reside? For example mainContenthome, mainContentabout, mainContentfaq, etc as this will allow for unique positioning but lose their common styles only to reapply them later? That would undermine the whole idea of sharing an external CSS style sheet for ease in updating pages later.
Or, should I my approach be to keep the current ids for mainNav, mainContent, and mainSidebar applying their styles (positioning) once, leave them alone and assign more unique ids to the remaining divs that change in size and content from page to page i.e. topFacthome, topFactabout and topFactfaq, etc.
Or is this issue related to relative and absolute positioning? I must admit, I am not quite solid in understanding the options (pro and cons) these options. Sitewide I have only employed positioning through padding and margins, nothing is positioned relatively or absolutely. (I'm almost embarrassed to say that ....)
I apologize if the clarity of my issue is hard to understand. I tried my best to remain brief and concise. If you have questions about what the hell I'm trying to express, please ask rather than pass me by. :)
Cheers, and thanks ....
I have chosen to use a single external style sheet (CSS) for the ease of making changes later, as necessary.
For uniformity sake, the header, main-navigation, main-sidebar, main-content areas and footer will remain unchanged "positioning-wise" and "styling-wise" across the web site. My approach to this point has been to give these divs the same id for each corresponding page, i.e. mainContent, mainNav, mainSidebar for ease of styling. The only divs I have been focused on to this point has been the mainContent div and a couple of the divs where content changes from page to page. I have had no problem with the positioning of the mainNav, mainSidebar, or footer as I have not begun filling them with content.
Through adding other divs (images / text) which will change from page to page, I have found myself needing to "tweak" the positioning of mainContent naturally resulting in inconsistency in positioning between pages. I should have realized this was going to happen, but I am learning as I go.
Now that I have identified my error, what is the best approach to correct my positioning issues?
Should I go back and change the id's to these divs so as they will be unique to the page on which they reside? For example mainContenthome, mainContentabout, mainContentfaq, etc as this will allow for unique positioning but lose their common styles only to reapply them later? That would undermine the whole idea of sharing an external CSS style sheet for ease in updating pages later.
Or, should I my approach be to keep the current ids for mainNav, mainContent, and mainSidebar applying their styles (positioning) once, leave them alone and assign more unique ids to the remaining divs that change in size and content from page to page i.e. topFacthome, topFactabout and topFactfaq, etc.
Or is this issue related to relative and absolute positioning? I must admit, I am not quite solid in understanding the options (pro and cons) these options. Sitewide I have only employed positioning through padding and margins, nothing is positioned relatively or absolutely. (I'm almost embarrassed to say that ....)
I apologize if the clarity of my issue is hard to understand. I tried my best to remain brief and concise. If you have questions about what the hell I'm trying to express, please ask rather than pass me by. :)
Cheers, and thanks ....