PDA

View Full Version : bg color, general advice.


jpolo9
04-25-2005, 07:34 PM
hey just started remaking this site in css: http://norcaldesigns.sytes.net/norcal/muldavin/

and i was wondering why in FF the BG color for the bottom section isn't showing up.

Also i would greatly appreciate any general advice on CSS, and how i formed my page as i am still trying to learn and improve. Thanks,
-Jesse

Auriga
04-25-2005, 07:42 PM
I'm still trying to get to grips with CSS myself.

One of the best places to start learning is the W3Schools (http://www.w3schools.com/css/)

jpolo9
04-25-2005, 09:30 PM
thanks i think i have a pretty good grasp on it, i'd just like to know what i can do better in terms of naming conventions, when to use div's as opposed to spans or <p> stuff like that.

Graft-Creative
04-25-2005, 11:07 PM
when to use div's as opposed to spans or <p> stuff like that.

This is where your efforts at css, laudable as they are, fall short at the moment.

You need to look into the subject of *Semantic* html.

really a div or span should only be used when no other html element will do.

Things like <div class="h3"> blah blah</div> are an anathema to any clued up coder.

Gary

jpolo9
04-26-2005, 12:25 AM
thanks i agree that is what i know least about, ill study up on that tonight, I still can't figure out why in FireFox the home page is messed up, any ideas?

rmedek
04-26-2005, 04:08 AM
You'll have to be a little more descriptive... what specifically are your problems?

I see that the "bottom" section (I take it you mean the footer section?) has two divs-- #footer (which isn't closed) and #footerdefault. I'd take a look at that first.

As far as your other issue-- how to mark up things with proper "naming conventions"-- the simple answer is to mark things up as what they are. It's essentially the essence of any mark-up language.

For example, a paragraph should be marked up as a paragraph, a list as a list, a citation as <cite>, a block-quote as <blockquote>, an address as <address>, etc. Divs and spans are meaningless elements; they are used to denote a section (division) of the page to group elements in (or, in the case or span, to apply styles within an element, like "<p><span class="intro">An introduction</span> is sometimes styled differently within a paragraph to draw the reader in.</p>). So if you have a header, a descriptive paragraph, and a list of links in a navigation section you could mark it up like so:

<div id="navigation">
<h2>Navigation</h2>
<p>Please select your destination from the list below:</p>
<ul>
<li><a href="/home/">Home</a></li>
<li><a href="/somewhere/">Somewhere</a></li>
<li><a href="/somewhere/else.htm">Somewhere Else</a></li>
</ul>
</div>


Hope this helps...

jpolo9
04-26-2005, 04:52 AM
ahh thanks, the footer div is closed now.

The main problem i am having is that in FireFox the container Div doesn't surround all of the elements in #homeTextThreeContainer so that the BG below Swing Away, Wellness Care, accepted insurance policies doesn't show up.

as a side-note I just made a new stylesheet for printing so it all fits on one page :) Which is why i converted it to CSS. But if you have any specific sugguestions on my naming, how i should use div's less lemme know. thanks again,
-Jesse

jpolo9
04-26-2005, 08:22 AM
http://norcaldesigns.sytes.net/norc...vin/default.asp

you can see on the bottom in FireFox that the #homeTextThreeContainer doesn't fill in the whole bottom part with the green background, i can't figure it out

http://www.norcaldesigns.com/jesse/bottomProb.gif

And for some reason on pages where i use float (like the home page) i have to put an emty div with clear: both; to have the #container div reach the bottom of the content. If i dont have the <div class="clear"></div> then the #container div doesn't reach the bottom like so:

http://www.norcaldesigns.com/jesse/bottomProb02.gif

I'm stuck any ideas? oh and here's what its supposed to look like: www.muldavinchiro.com

jpolo9
04-26-2005, 05:00 PM
I tried changing the homeTextThree Container to a class which didn't change anything... lol just read your new post dm, why should i change it to a style just curious? Also the background of #container has to be white for the content on all the rest of the pages.

But i found the solution!!! I decided to get rid of the <div class="clear"></div> Because that was sort of like a bad bandaid, it sort of fixed part of the problem, but it sucked. So i took that out and just tried different things until i found out adding the clear: both; to the homeTextThreeContainer, (which sort of did the same thing as the div class="clear") andd added overflow: hidden solved the bg color issue! But now the continaer didn't go all the way to the bottom, looked like this: (note the white background stops way up high :S)
[imghttp://www.norcaldesigns.com/jesse/bottomprob03.gif[/img]

. So then i added overflow: hidden to #container to completely fix it. Also it allowed me to take out all those div class=clear in all the other pages!

So it is fixed now, thanks for taking a look and your sugguestions! If you know why adding the overflow: hidden made it work lemme know lol, two cheers for dumb luck (but i'd like to know why that worked).-Jesse

MattyUK
04-26-2005, 06:04 PM
Similar issue to the one I had:
http://www.codingforums.com/showthread.php?t=57566

This link may help. It did me:
http://www.quirksmode.org/css/clearing.html

:)

jpolo9
04-26-2005, 07:16 PM
thanks for the link :)

Understanding doesn't matter, though. It works!

lol!