PDA

View Full Version : external style sheets


marcia
03-04-2011, 02:21 AM
I linked a css style sheet into a new page that I want to add onto a site. The only style that came up automatically was the body information, not the #Wrapper or any of the other IDs, nor the classes starting with a dot.

The information is in the CSS panel, but does not appear on the screen.

This is the first time I tried to use the external style sheet.

Can someone help? I'll send whatever information you need.

edbr
03-04-2011, 02:33 AM
post wht you have done

marcia
03-07-2011, 10:14 PM
I have been trying to figure out what to send you since you asked. I have done this a million different ways. So I have bare-boned it to find out why, at least, the wrapper background is not showing #fff.

I was under the impression that the divs automatically showed up with an external style sheet. I would like this to be the header on 5 or 6 pages and change the bottom of the pages as necessary. Maybe there is another way, but copy and paste and templates haven't worked for me, either.

I am pretty discouraged as I've never known anything to be this difficult in my other endeavors. When we finally meet I will have no hair left.

http://www.http://www.multiplechoicebags.com/styles-mainSdHome2.css and
http://www.multiplechoicebags.com/sdHomeC2.html

M

edbr
03-08-2011, 12:02 AM
your div structure is off . i have guessed here but if you add comments at the close of the div it will help you check the divs are placed correctly
<body>
<div id="Wrapper">
<div id="header"></div><!--end header-->
<div id="column-main">
<div id="leftColumn"><img src="studioDianLogo.gif" width="120" height="207"></div>


<div id="column-side1"> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<div class="paintbrush"><img src="paintbrush.jpg" width="173" height="87" class="paintbrush"></div><!--end paintbrushn-->
<img src="websiteText.jpg" width="578" height="64"></div><!--end column-side-->

<div id="nav"></div><!--end nav-->
</div><!--end column main-->

<h4>&nbsp;</h4>
</div> <!--end wrapper-->
</body>

gentleone
03-08-2011, 12:22 PM
So I have bare-boned it to find out why, at least, the wrapper background is not showing #fff.
It's because you used floats in the wrapper div. These elements are taken out of the normal flow, so they won't dictate the height of the wrapper div (they're floating).
If you set a height to your wrapper div in the CSS then your white background color will show up, but this would not be an ideal solution, because every time that your content gets longer then that height you'll have to adjust it in your CSS so that it fits or if you have pages with different content lengths then you'll have to set individual wrapper heights in your CSS.

A better solution would be to use the clearfix hack.
http://perishablepress.com/press/2009/12/06/new-clearfix-hack/
Then simply set a class 'clearfix' to your wrapper div.

marcia
03-08-2011, 07:03 PM
Thanks to you both.

Just noticed the address in my last post was incorrect. It should read: (why doesn't the 'styles-main' come up?

http://www.multiplechoicebags.com/styles-mainSdHome2.css

Does this make any difference? I've never sent a css file to the forum so don't know the correct syntax.

Also,

How do I get the divs to repeat from one page to another? Can I get them to repeat?

edbr
03-09-2011, 12:35 AM
how do you mean repeat? id, use once per page class, can be repeated on the same page

gentleone
03-09-2011, 06:21 AM
Just noticed the address in my last post was incorrect. It should read: (why doesn't the 'styles-main' come up?

http://www.multiplechoicebags.com/styles-mainSdHome2.css

The stylesheet loads fine. If some styles are not showing up, then the CSS rules are not rightly coded. Like the one I mentioned in my previous reply.

edbr
03-09-2011, 08:09 AM
it shows now i see . you have an empty div on line 18 you can lose

marcia
03-09-2011, 03:50 PM
edbr:

I want to have several pages look the same, except for the main content. As I said, but not clearly enuf, I thought that the style sheet would copy the styles AND the divs. I know you can only use one id per page.

Also, I still haven't been able to get the header to copy accurately from one page to another, except to do a 'save as' and remove all the rest of the information and insert new divs and info.

So, if you can use a style sheet to repeat the chosen styles on a different page - is there an equivalent sheet that will copy the divs from one page to another, or do you need to create new divs on each page - even if you have a book with the same layout on each page? Maybe it has to do with templates?

Corrosive
03-09-2011, 04:11 PM
CSS is styles only, not HTML. You have two choices with making a 'master' file for the HTML: The Dreamweaver way http://www.dreamweaverclub.com/dreamweaver-templates.php and the sensible choice ;) http://www.dreamweaverclub.com/php-includes.php

marcia
03-09-2011, 07:05 PM
Well. that was certainly helpful! (If I can use it)

So, now - I am piggy backing onto another website (Mainpage.com) and naming it Mainpage.com/sdHome.html and then linking all of the sub pages to that. If I attach a template to just the sdHome and its links, will that affect the Mainpage? I would like to use the .dwt just for the sdHome section.

Is SSI the same (or interchangeable) with PHP?

Also, what does a green check mark rating next to my thread mean?

Corrosive
03-10-2011, 08:37 AM
Is SSI the same (or interchangeable) with PHP?

Yep

Also, what does a green check mark rating next to my thread mean?

Absolutely no idea.

gentleone
03-10-2011, 09:06 AM
Also, what does a green check mark rating next to my thread mean?
This means that you've started, or posted a reply to, that thread.

Corrosive
03-10-2011, 09:10 AM
This means that you've started, or posted a reply to, that thread.

I'm glad you are awake this morning Ralph. I feel like today might be a struggle...

gentleone
03-10-2011, 01:32 PM
I'm glad you are awake this morning Ralph. I feel like today might be a struggle...
Good.. I would have taken a day off if I were you... did you? :)