# CSS Help



## Da_iMac_Daddy (Feb 3, 2004)

Hey guys,
I'm having some trouble with a menu I am working on. Nothing fancy just some divs whose background color changes when you hover over them. But the problem is that I want to adjust the height so that the text has little to no spacing between them and the border. When I use height and width the text is overlapped by the border. Another thing is, it seems like the text wants to stick to the bottom of the div but I want it to have even spacing all around. I've tried setting the padding of the text to 0px but that doesn't seem to work.

Any help is appreciated,
Nathan Coffield

P.S.- I don't have anywhere to host my page so I'm sorry that I can't show you the page.


----------



## mdnky (Feb 3, 2004)

Your best bet is to forget about the height, and use very small amounts of padding.

 Copy and past the relative code into a seperate HTML file (with the css for the menu), and ZIP it.  Then attach it to a post and we'll see what we can do with it.  I think I have a vague idea of what you're trying to do, but not enough to help much.


----------



## Da_iMac_Daddy (Feb 3, 2004)

I've attached the zip. two files 1 html and one css they're not very big.


----------



## mdnky (Feb 3, 2004)

Da_iMac_Daddy said:
			
		

> I've attached the zip. two files 1 html and one css they're not very big.




I renamed both files to keep them easily seperated.  Wound up completely rewriting them since there's a major difference in the HTML4 and XHTML doctypes when the brower renders them, and I'm more comfortable in the later.

It should scale at least 2-3 times up or down properly (text zoom), with everything lining up.  I didn't bother to put any fixes/hacks in for MSIE or the other buggy browsers, since I didn't know if this is where you were trying to go with it.

Changes made:
* XHTML Trans doctype
* Smarttags META (to prevent them)
* Container div to keep everything together properly, allow centering also
* Width adjusted to allow 800x600 user proper viewing
* Font-sizes using ems, body declared at 90%


----------



## Da_iMac_Daddy (Feb 4, 2004)

Where's the menu? It doesn't show up in IE. I'll have to check it when I'm home.


----------



## Da_iMac_Daddy (Feb 4, 2004)

OK I'm home now. Looks good in Mozilla Firebird. In IE 6 the menu still doesn't show up. Hmm. I had this working on my beaches page but my Mac is packed up in storage until I can get rid of this old pc I have in my new apartment. 

Hey it looks great in a good browser but IE still just ruins it for the rest of em.


----------



## mdnky (Feb 4, 2004)

Wasn't worried about IE until I knew for sure that's what you wanted or not.  I'll play with it this evening so it works and post it then.


----------



## mdnky (Feb 5, 2004)

I checked it out on my brother's Win98 machine with IE6, no menu of course.  Firgures, but hey...it works in IE5.2 Mac and Firebird, Moz, etc!  Heck, Lynx run in the Terminal even displays the navigation...COME ON MICRO$OFT!  Get with the program!  I need to get my testing station back up, that way I can check stuff on all the ancient browsers.

All kidding aside, I got stuck at work this evening until 11pm...instead of 5pm like I was supposed to.  We're swamped, so it might be a day or two until I can look at that again.


----------



## Da_iMac_Daddy (Feb 5, 2004)

It bothers me that the MOST used browser in the known world is probably the worst out there. ::sigh:: When will everyone learn that just because it works doesn't mean it doesn't need fixin' :\


----------



## Da_iMac_Daddy (Feb 5, 2004)

mdkny your personal page is beautiful. Looks almost like moveable type. I am very impressed my friend. Where did you learn CSS and XHTML? I've looked on w3schools.com. Unfortunately there seems to be more to CSS than w3schools mentions. Like what is the difference between this .leftCol and this #leftCol?


----------



## mdnky (Feb 5, 2004)

Never had the chance to do much with that page, maybe one of these days I'll get around to it.  Thanks though.

As far as learning it...just started with that homepage of mine, and kept screwing up until I figured it out.  I've messed with HTML since I was like 10 or so, that helped a bit.

There's some excellent rescources on the web, including:
* ALA (http://www.alistapart.com) 
* CSS Vault (http://www.cssvault.com)
* CSS Zen Garden (http://www.csszengarden.com)
* MaxDesign (http://css.maxdesign.com.au/index.htm)

Look at what others have done...especially stuff by Jeffrey Jeldman, Eric Meyer, *Russ Weakley*, etc.

.leftcol is a class, where #leftcol is an id.  For more on the id vs. class thing, check out the Selectutorial at Max Design.


----------



## Da_iMac_Daddy (Feb 5, 2004)

Thanks I'll check them out.


----------



## Da_iMac_Daddy (Feb 7, 2004)

I have fixed the IE problem. The menu displays in IE now but I can in no way position the menu to my liking. I don't know what's up. Maybe someone can take another look and tell me what I'm doing wrong.


----------



## Da_iMac_Daddy (Feb 7, 2004)

Figured it out. Stupid case sensitive classes. But now I still can't get the text to be set in the middle of the menu boxes.

As always any help is greatly appreciated.


----------



## Arden (Feb 8, 2004)

It's all about padding.  Check out what I did with it.

Couple things:
- Why didn't you just link to an online page, instead of putting them up as a zip?
- Why is the page named index.htm.htm?


----------



## chevy (Feb 8, 2004)

CSS reference site http://www.blooberry.com/indexdot/css/index.html


----------



## Da_iMac_Daddy (Feb 8, 2004)

Sorry about the .htm.htm WinXP sometimes screws me up. My webserver isn't back up yet I just renewed my account. I'll take a look at the page you created. 

Thanks for the help.


----------



## Da_iMac_Daddy (Feb 8, 2004)

Hmm. My computer says the .zip file is corrupt or contains no files.


::edit:age is up at http://php.dekster.com/. weird thing is my subdomain works but my front page www.dekster.com/ isn't back to normal yet :\ ::/edit::


----------



## mdnky (Feb 8, 2004)

Sorry about the lack of response, I've been sicker than a dog for the past few days.

There's a few issues with the site you need to address.  First off is that menu...it's way to thin, and will be a pain in the U know what for users.  The only way to make it that thin is to use images for the links, otherwise the differences in browsers/systems/base font sizes/text zooms/etc...well, it just won't be pretty.

Secondly is the doctype.  You're gonna have alot of problems with the HTML 4 trans one using CSS layout.  XHTML 1 Trans, or better yet Strict, is going to be better in the long run.

Third is accessibility.  That can wait till later though.  I'll post some screenshots to show you what I mean by that then.


----------



## Da_iMac_Daddy (Feb 8, 2004)

hmm... Never thought of the menu being too thin. Actually it looks pretty good in IE and Mozilla Firebird and I'm really only worried about those two for now. I'll have to read up more on doctypes I have no idea what it means . Now I must go smash the weapon of ignorance and read up on doctypes. Keep the comments coming! 

Thanks.


----------



## mdnky (Feb 8, 2004)

I'm e-mailed you some screen shots so you can see what I mean.  Fair warning, the sit file is in the 3mb range though.  

They're taken in 3 different browsers (Safari 1.2, Firebird 0.7, and IE 5.2).  Normal is the standard size setting, plus 1 is one higher than normal (120% in IE), plus 2 is 2 higher than normal (150% in IE), minus 1 is one lower than normal (90% in IE), minus two is two lower than normal (75% in IE).


----------

