navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

am i using css properly???

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> am i using css properly???
Page: [1]
 
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
am i using css properly??? - 3/14/2005 7:36:42   
Hi
Im currently learning css. Instead of using bold I have defined a span style for bold as I need to use it in the middle of paragraphs.
span.bd 
{ font-size: 10px; font-weight: bold }


Is this the best way to do this??? :)

I also need to make paragraphs bold should I use the same span or define it as a paragraph style

Thanks
Donkey

 

Posts: 3888
Joined: 11/13/2001
From: Blackfield United Kingdom
Status: offline

 
RE: am i using css properly??? - 3/14/2005 8:08:54   
Rather than use a span I would define the <b> tag and use that (less typing).
For the same reason I would say it's better to have a paragraph style with bold defined than use nested <span> and <p> tags.

_____________________________

:)

I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't.
Samuel Clemens

(in reply to labs123)
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
RE: am i using css properly??? - 3/14/2005 9:21:06   
Thanks for the advice Donkey. Im a little new to this so did u mean like this

p.bold
{font-size: 10px;
 font-weight: bold
}


Can I just use the b in frontpage or did you mean define it like this in the style sheet
b
{font-weight: bold}




(in reply to Donkey)
Donkey

 

Posts: 3888
Joined: 11/13/2001
From: Blackfield United Kingdom
Status: offline

 
RE: am i using css properly??? - 3/14/2005 9:46:09   
Yep. That's what I meant.

The bold tag has not been depreciated in xhtml so you can still use it, but there's nothing to stop you defining it or AFAIK creating classes for it. You can give the font-weight property numerical values as well as just bold, bolder and lighter. So in theory you could have several classes of bold tag giving varying levels of boldness. In practice I understand it is a bit hit & miss as some fonts will default to only one level of boldness. (or should that be boldidity?:))

_____________________________

:)

I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't.
Samuel Clemens

(in reply to labs123)
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
RE: am i using css properly??? - 3/14/2005 10:21:15   
quote:

Yep. That's what I meant.


Feels good to know Im actually getting all this

Cheers Donkey your the best :)

(in reply to Donkey)
Nicole

 

Posts: 2843
Joined: 9/15/2004
From: Nambucca / Kempsey, Australia
Status: offline

 
RE: am i using css properly??? - 3/14/2005 18:43:01   
Hi Labs,

It's probably a very basic tip, but we (I do) tend to get wrapped up in the actual CSS and page that i'm working on, and lose sight of the forest for the trees. An excellent example of this is the most recent questions i've asked on this board about some CSS problems.

It takes patience, but sometimes when you encounter a problem, try starting a new page, attaching a brand new CSS with only the code you're having trouble with and experiment with that code and see what happens to the new page.

I know it sounds very basic, but i've just done this, and solved a problem in a matter of 10 minutes that i'd laboured over for 2 days.

Stick with CSS btw, i'm very new to it also, and can't imagine creating a site without CSS again!

Nicole

_____________________________

:)

(in reply to labs123)
d a v e

 

Posts: 4138
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: am i using css properly??? - 3/15/2005 0:17:07   
unless you have some specific reason for doing so i would just leave it in the html, i.e. use
<strong>this text is bold</strong>


though of course there's nothing to stop you playing:)

_____________________________

David Prescott
Gekko web design

(in reply to Nicole)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 5:01:52   
Just shows how flexible all of this is.

If I have something that will be BOLD in lots of pages or several places on one page then I specify it in the style sheet.

If it's just one thing in one page then I'll sometimes stick a span on it.

If however it's a site that will be subject to changes later on then I use the style sheet as I may well need to use it more often in changes.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to d a v e)
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 5:04:43   
I have redone my whole work site using css for formatting,,, i think positioning is a little beyond me at the moment but will carry on playing and finding out new things :)

Thanks for the help darlings!!!!!

(in reply to d a v e)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 5:07:02   
Positioning is the toughie.

I now have 3 basic layouts I keep as templates and tweak those for each new site. If you're going to use css for layout be prepared for it to take you quite a while if the layout is more than a 2 col with header.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to labs123)
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 5:41:21   
quote:

Positioning is the toughie.


Yep I read up on it and thought hmmmm will save that until later.

Like you said Jaybee its all very flexible and depends on the site will see what fits the site better. Its 50+ pages now so I might define b in the style sheet incase the site needs more boldidty in the future :)


(in reply to jaybee)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 7:13:47   
quote:

more boldidty


Oh please don't encourage him!

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to labs123)
Donkey

 

Posts: 3888
Joined: 11/13/2001
From: Blackfield United Kingdom
Status: offline

 
RE: am i using css properly??? - 3/15/2005 9:28:32   
quote:

more boldidty
If I may correct your spelling on this one.
quote:

bol·did·i·ty
n. pl. bol·did·i·ties

1. The act of emboldenment.
2. Bravery in a silly or pointless way.
3. A little known 60’s rhythm and blues guitarist.

From the Oxford Imaginary Dictionary of made up words.:)

_____________________________

:)

I have a higher and grander standard of principle than George Washington. He could not lie; I can, but I won't.
Samuel Clemens

(in reply to jaybee)
labs123

 

Posts: 226
Joined: 7/1/2004
From: Staffordshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 10:15:32   
quote:

Oh please don't encourage him!


sorry Jaybee - Its too late!!!!

(in reply to jaybee)
jaybee

 

Posts: 14175
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: am i using css properly??? - 3/15/2005 13:32:44   
:)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to labs123)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> am i using css properly???
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts