CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 29th, 2004, 11:43 AM
elliottg elliottg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: NYC
Posts: 106 elliottg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 15 m 29 sec
Reputation Power: 6
CSS Type setting question

I am having no luck using this rule to set text with-in the body tags correctly.

body{font-family: sans-serif; font-size: 11px; color: #CC0000}

This line will set the color and family of the text but it doesnt effect the typeface's size or any other parameters either. I have tried both pt's and px's but no luck. When I use the <span> configuration for text all is fine. But when I use a rule as above something doesn't work.

Any ideas?

Thanks

Reply With Quote
  #2  
Old February 29th, 2004, 12:57 PM
Clan admin's Avatar
Clan admin Clan admin is offline
AZbb founder
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 843 Clan admin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 52 m 44 sec
Reputation Power: 5
If above is the only line you are using, it is very limited.

Show an example to make suggestion easier.

Good luck
__________________
© AZ

AZbb :: AZ Bulletin Board - Secure BBS script, Front page CMS, Chat, No database
Simple Guide to Apache and PHP installation on Windows

Reply With Quote
  #3  
Old February 29th, 2004, 04:43 PM
elliottg elliottg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: NYC
Posts: 106 elliottg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 15 m 29 sec
Reputation Power: 6
Here is the entire externally linked sheet. I have tried getting the body rule to work with just the one afore mentioned line as well as in the context of the full sheet. Same result either way only the the text color renders.

Here the full style sheet.

body{font-family: sans-serif; font-size: 11px; color: #CC0000}

.textblack{font-family: sans-serif; font-size: 11px; color: #000000}
.textwhite {font-family: sans-serif; font-size: 11px; color: #ffffff}
.textred{font-family: sans-serif; font-size: 11px; color: #CC0000}
.textredbold {font-family: sans-serif; font-size: 11px; font-weight: bold; color: #CC0000}
.textwhitebold {font-family: sans-serif; font-size: 11px; font-weight: bold; color: #ffffff}
.textdisplayhuge {font-family: sans-serif; font-size: 38px; font-weight: bold; color: #ffffff}
.warningtext {font-family: sans-serif; font-size: 14px; font-weight: bold; color: #CC0000}

.inputfield {font-family: sans-serif; font-size: 11px; font-weight: normal; background-color: #EEF3DD; border: 1px solid #666666}
.submitbutton {font-family: sans-serif; font-size: 10px; background-color:#BAE8F5; color: #000000}


a:link { font-family: sans-serif; font-weight: bold; font-size: 11px; color:#000000 text-decoration: none;}
a:visited {font-family: sans-serif; font-weight: bold; font-size: 11px; color:#000000 text-decoration: none;}
a:hover {font-family: sans-serif; font-weight: bold; font-size: 11px; color:#CC0000 text-decoration: none;}

a.white:link { font-family: sans-serif; font-size: 11px; color:#ffffff}
a.white:visited {font-family: sans-serif; font-size: 11px; color:#ffffff }
a.white:hover {font-family: sans-serif; font-size: 11px; color:#CC0000}

Reply With Quote
  #4  
Old February 29th, 2004, 05:09 PM
Clan admin's Avatar
Clan admin Clan admin is offline
AZbb founder
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 843 Clan admin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 52 m 44 sec
Reputation Power: 5
In order to make sure there are no 'inheritance' problems you should group them together

i.e.:
PHP Code:
/* or more as I don't know how you have done it */

body    font-size11pxcolor:#CC0000 }

bodydivspandlultd 
    
{font-familysans-serif; } 


Many of the listed CSS inherit their values form their parents i.e.:
.textblack from div.textblack or span.textblack or td.textblack

It would be more cross browser, cross platform compatible.

Good luck

Reply With Quote
  #5  
Old February 29th, 2004, 05:38 PM
elliottg elliottg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: NYC
Posts: 106 elliottg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 15 m 29 sec
Reputation Power: 6
Thanks for the input but it still doesn't work right. When I used the code you wrote I still could not change the point size and also instead of being set in sans-serif it was the default serif.
Strange.

I have a bit of an understanding of inheritnce but maybe you could expand on how it directly effects this case?

Also with the grouped rule I assume that should style all of the tags in the list? I am pretty new to CSS.

Thanks for your help you are awesome!

Reply With Quote
  #6  
Old February 29th, 2004, 08:07 PM
Clan admin's Avatar
Clan admin Clan admin is offline
AZbb founder
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: London, UK
Posts: 843 Clan admin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 52 m 44 sec
Reputation Power: 5
Can you post the actual html [a sample]?

I would want to see what above classes are.

Good luck

Reply With Quote
  #7  
Old March 1st, 2004, 12:32 AM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,588 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 17 h 2 m 32 sec
Reputation Power: 662
Quote:
Originally Posted by elliottg
<snip>
Also with the grouped rule I assume that should style all of the tags in the list? I am pretty new to CSS.<snip>

Actually, that can lead to problems.
Code:
body, div, span, dl, ul, td
    {font-family: sans-serif; } 

is better done as

body {
    font: sans-serif 11px;
    color: #333;
    background-color: #fff;
    }
The other elements inherit these properties. Only changes in descendent elements should be specified.

To find the problem(s) with your code, use this method.

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Reply With Quote
  #8  
Old March 1st, 2004, 07:45 AM
elliottg elliottg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: NYC
Posts: 106 elliottg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 15 m 29 sec
Reputation Power: 6
Here is one php file that is linked to the style sheet. The sheet styles the entire app that this file belongs to. The only part of this file that the body rule would apply to would be the line that is commented. The other text on the page are different <span> classes. I know this is overall probably a pretty clunky way to us css. But I guess thats why I'm on the forum.

Thanks!

<htmL>
<head>
<link rel=stylesheet href="../../master.css" type="text/css">
</head>
<body bgcolor='#5A5E4C' leftmargin ='2' topmargin='0' marginwidth='0' marginheight='0'>

<?php

## Query database and get data from email_list_outgoing_info.
## If error from proccessor script was logged then this page is loaded with
## new vars that were entered from user, instead of DB data.

if($no_DB_reload != 1) {
####### QUERY #######
$query="SELECT *
FROM email_list_outgoing_info
WHERE id ='$list_name'";
$result = mysql_query ($query);
$row = mysql_fetch_array ($result);
extract($row);
}


## Begin form.
print"
<form enctype='multipart/form-data' action='outgoing_info_processor.php' method='POST'>
<table width='100%' bgcolor='#000000' border='0' cellspacing='0' cellpadding='3'>
<tr><td width='300'>&nbsp;</td>
<td width='450'>


########### The line of text below is an exapmle of where ###### #### the body rule would style my text.
Subject *required
<br>
<input type='text' name='subject' value='$subject' size = '48' maxlength = '100' class='inputfield'>
<br>
<br>
<span class='textwhite'>Message *required</span>
<br>
<textarea name='body' rows='16' cols='45' class='inputfield'>
$body
</textarea>
</td>

<td>
<span class='textwhite'>Signature</span>
<br>
<textarea name='signature' rows='5' cols='45' class='inputfield'>
$signature
</textarea> <br><br><br>

<iframe src='outgoing_info_attach_info.php' width='60%' height='75' frameborder='0'
scrolling='no'></iframe>
<br>
<span class='textwhite'>New/Replace attachment:</span>
<br>
<input name='attachment' type='file' size = '18' class='inputfield'>
<br>
<br>
<input type='submit' name='submit' value='Submit changes' class='submitbutton'>
<input type='submit' name='submit' value='Reset' class='submitbutton'>
<input type='submit' name='submit' value='Cancel' class='submitbutton'>
</td>
</tr>
</table>

</form>";

?>
</body>
</htmL>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS Type setting question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT