PDA

View Full Version : Creating multiple pages and using CSS


Dannybhoy
03-19-2012, 02:56 PM
Hi everyone

Im a newbie on here and looking for someone to just set me straight on a couple of things looked over old posts and it helps somewhat however I shall now explain my dilemma.

Just started a wireframe for a site I am doing as part of my marketing degree for a real business...I have just over 3 weeks to complete a 12 page website.

Now I have a basic understanding of css and we covered html in class only basic stuff....I have done a baisc layour of my index page and created an external style sheet and saved this in my folder in its own css folder....the page is basic enough I just created the logo,navigation,header,body and footer divs and applied colour etc I now want want to add more pages using this basic layout and then obviously edit each page....

However I am not sure the best way to do this...

Can I save this index page as a template?
What i did was go to save as and saved all my other pages ie duplicated this page 12 times

My only problem now is that If I now go in to edit parts of the other pages that are different ie body, image placeholders I cannot change any of the CSS as obviously it changes every page then. How do I overcome this do i have to make other style sheets for the other pages ? I have 3 books here and still quite puzzled about what to do or what I have done wrong

any help would be greatly appreciated

Corrosive
03-19-2012, 03:14 PM
Your best best is to keep your website consistent throughout in look and layout. That way, one stylesheet should do the lot. You can also use Dreamweaver's built in template system to make site-wide updates to consistent elements (for example, adding a menu link where you don't want to have to update the menu on every page).

Otherwise you will indeed be creating page specific styles. These can go in between the <head> tags of an individual page if you need them.

Hope that helps.

Dannybhoy
03-19-2012, 04:05 PM
Thanks for the quick response....I understand what your saying and my whole site will have the same colours and styling throughout what I mean is that say on my index page I want to have a slide show underneath the navigation bar but on the other pages I wish to just have a photo underneath and there is obviously going to be different content on each page so how do i edit this content without affecting all of the pages at once...

I must sound like an absolute clown but Im still a little confused sorry I have attached what the page looks like in browser allready....

This page will be consistent throughout every page but its just when it comes to sltyling ie the gallery page which will have loads of pictures where do i save the css for that

Thanks though

Corrosive
03-19-2012, 04:08 PM
Well an image or a slideshow would be content, so just insert them into your HTML. No point in having a photo, that is relevant to the content of a page, and then just setting it as a background to a div in CSS. :)

Dannybhoy
03-19-2012, 04:17 PM
Thanks I understand how to insert the image into the HTML in the right place however dont you have to use CSS to style the image ie placement on page etc where does this css go if I dont want to affect all the other pages

Corrosive
03-19-2012, 04:29 PM
But wouldn't your slideshow and photos all be the same size? So you'd create a CSS rule for #slideshow and then put the div tag into your HTML. Position that and then you can insert whatever you want into it. The CSS stays constant but the content changes. Also don't forget that a div will naturally fill the space it is allowed so you may not even need to specify height or width. Perhaps just a margin or two.

If not then you can just use a different div id on each page. I think you are 'over-thinking' this a bit too much.

Dannybhoy
03-19-2012, 05:02 PM
Thanks a lot and your right I probably am overthinking things at this stage thanks for your help I will give this a go tomorrow and see how I go thanks