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 March 9th, 2004, 12:47 AM
GaijinPunch GaijinPunch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 46 GaijinPunch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 37 m 58 sec
Reputation Power: 5
CSS: Defining own styles

I've read up, and have always used a bit of CSS. I'm redoing my site, and noticed something different between Mozilla and IE.

Personally, I'd ditch IE, but 98% of my viewers use it, so I can't. Basically, in IE, the following works:

Code:
P
{
	color: black;
	font-size: 10pt;
	font-family:tahoma;
}

myown
{
	color: blue;
	font-size: 10pt;
	font-family: Tahoma;
}

<myown>This is my text</myown>


When I run it in IE though, it basically ignores the self-defined tag, and requires me to use a pre-defined keyword. I don't want to use "P", b/c it carries the html<P> tag characteristics... a new line in this case.

Thanks.

Reply With Quote
  #2  
Old March 9th, 2004, 12:55 AM
paularms paularms is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 6 paularms User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
you need to specify whether it is a # or . ...

ie...
use this if you are going to use the class more than once on a page
Code:
.myown
{
        color: blue;
        font-size: 10pt;
        font-family: Tahoma;
}

for this case you would specify in the HTML
Code:
<div class="myown">This is my text</div>



if you use a # instead of a . then you should only use this element ONCE per page. the HTML would look like this.
Code:
<div id="myown">This is my text</div>

Reply With Quote
  #3  
Old March 9th, 2004, 01:29 AM
GaijinPunch GaijinPunch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 46 GaijinPunch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 37 m 58 sec
Reputation Power: 5
You're a rockstar. Thanks. I need to read up on DIV and CLASS I suppose.

Actually, I tried it like this (just experimenting, not knowing what they would do. They solved one problem, but not another.

What I'm trying to do is print out a page counter (like in a forum). I've got a Perl script that calculates the number of pages, and then prints them out with links. The problem was, it was stupid to have a link to the page you were on. When I used "P" (assuming you were on page 4 of 7) it looked something like

1, 2, 3,
4,
5, 6, 7,

Using .myown as you stated above worked, but only when I closed the DIV after ALL of the pages were displayed. I assume breaking a DIV is going to start everything after that on a new line?

Anyways, thanks!

Reply With Quote
  #4  
Old March 9th, 2004, 10:13 AM
cliffhanger9's Avatar
cliffhanger9 cliffhanger9 is offline
fortin bra?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: city of sin, state of the art
Posts: 416 cliffhanger9 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 18 h 22 m 19 sec
Reputation Power: 0
Send a message via ICQ to cliffhanger9 Send a message via AIM to cliffhanger9 Send a message via MSN to cliffhanger9 Send a message via Yahoo to cliffhanger9
yea why not just make the page numbers in their own div/span?

good lucky and rock on!!
__________________
"I hate quotations."
-ralph waldo emerson-

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS: Defining own styles


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 6 hosted by Hostway