SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Container Content Question

    I am building by site using Dreamweaver CS3....my index page isnt as big as other pages and i dont know how to apply different size background images for the index page and the faq's page. I am new to CSS and trying to learn to do everything properly. here is the site. look at the home page and the faqs page. the background image on the home page is too big and makes a lot of dead space at the end. tyrusdesign dot com

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2007
    Location
    Toronto
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the CSS code you have the following:

    Code:
    .oneColFixCtrHdr #container {
    	width: 955px;
    	margin: 0 auto; /* this overrides the text-align: center on the body element. */
    	background-image: url(images/mainbody_bg.jpg);
    	background-repeat: no-repeat;
    	text-align: left;
    }
    This evidently applies to both your pages. To have a different one for your FAQ page, just create a new one, for example:

    Code:
    .oneColFixCtrHdr #container_faqs {
    	width: 955px;
    	margin: 0 auto; /* this overrides the text-align: center on the body element. */
    	background-image: url(images/faq_bg.jpg);
    	background-repeat: no-repeat;
    	text-align: left;
    }
    Then just change the name of the container in your FAQ HTML.

    Of course, this is just a very simple way of doing it. Normally this sort of thing would be switched using different classes dynamically changed via PHP or something.

    Louis


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •