PC Review


Reply
Thread Tools Rate Thread

CSS - Advice needed - Please Bear With Me

 
 
Don
Guest
Posts: n/a
 
      8th Dec 2006
I am a total new starter when it comes to CSS but I believe I am learning
fast. I'm stuck and wonder if I am seeking a solution that just isn't
possible.

What I would like to do is have an entry in my style sheet that dictates all
images on a page will have a border, all parameters for that border to be
picked up from the style sheet (thickness, colour and so on).

I know I can define an entry in my sheet for example..

..picdefcol {
border: 1px solid;
border-bottom-color: Black;
border-right-color: Black;
border-left-color: #E3E3E3;
border-top-color: #E3E3E3;
}

It seems to me the only way to get the pictures to pick up the values is to
right click on them and then apply .picdefcol via the Style button.

Am I asking too much?

Any advice from you experienced guys and gals would be very much
appreciated.

Thank you,

Don


 
Reply With Quote
 
 
 
 
Steve Easton
Guest
Posts: n/a
 
      8th Dec 2006
What you want to do is easy.

All it requires is:

img {
border: 1px solid;
border-bottom-color: Black;
border-right-color: Black;
border-left-color: #E3E3E3;
border-top-color: #E3E3E3;
}

The above will be applied to all images in all pages that use the style sheet,
and you will not have to apply a class.



--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm


"Don" <(E-Mail Removed)> wrote in message news:1M2dnZmQVZzea-(E-Mail Removed)...
>I am a total new starter when it comes to CSS but I believe I am learning fast. I'm stuck and wonder if I am seeking a
>solution that just isn't possible.
>
> What I would like to do is have an entry in my style sheet that dictates all images on a page will have a border, all
> parameters for that border to be picked up from the style sheet (thickness, colour and so on).
>
> I know I can define an entry in my sheet for example..
>
> .picdefcol {
> border: 1px solid;
> border-bottom-color: Black;
> border-right-color: Black;
> border-left-color: #E3E3E3;
> border-top-color: #E3E3E3;
> }
>
> It seems to me the only way to get the pictures to pick up the values is to right click on them and then apply
> .picdefcol via the Style button.
>
> Am I asking too much?
>
> Any advice from you experienced guys and gals would be very much appreciated.
>
> Thank you,
>
> Don
>



 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      8th Dec 2006

"Steve Easton" <(E-Mail Removed)> wrote in message
news:%23U$(E-Mail Removed)...
> What you want to do is easy.
>
> All it requires is:
>
> img {
> border: 1px solid;
> border-bottom-color: Black;
> border-right-color: Black;
> border-left-color: #E3E3E3;
> border-top-color: #E3E3E3;
> }
>
> The above will be applied to all images in all pages that use the style
> sheet,
> and you will not have to apply a class.
>
>
>
> --
> Steve Easton
> Microsoft MVP FrontPage
> FP Cleaner
> http://www.95isalive.com/fixes/fpclean.htm
> Hit Me FP
> http://www.95isalive.com/fixes/HitMeFP.htm


Steve that is fantastic. I cannot thank you enough. I have struggled with
that for days and failed to find the answer by Googling. You are a star
mate.

Jon


 
Reply With Quote
 
Steve Easton
Guest
Posts: n/a
 
      9th Dec 2006
Glad to help and thanks for the kind words.

--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm



"Don" <(E-Mail Removed)> wrote in message news:-(E-Mail Removed)...
>
> "Steve Easton" <(E-Mail Removed)> wrote in message news:%23U$(E-Mail Removed)...
>> What you want to do is easy.
>>
>> All it requires is:
>>
>> img {
>> border: 1px solid;
>> border-bottom-color: Black;
>> border-right-color: Black;
>> border-left-color: #E3E3E3;
>> border-top-color: #E3E3E3;
>> }
>>
>> The above will be applied to all images in all pages that use the style sheet,
>> and you will not have to apply a class.
>>
>>
>>
>> --
>> Steve Easton
>> Microsoft MVP FrontPage
>> FP Cleaner
>> http://www.95isalive.com/fixes/fpclean.htm
>> Hit Me FP
>> http://www.95isalive.com/fixes/HitMeFP.htm

>
> Steve that is fantastic. I cannot thank you enough. I have struggled with that for days and failed to find the
> answer by Googling. You are a star mate.
>
> Jon
>



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      9th Dec 2006
You need to pay attention to Steve's solution in the larger context. So
many new users of CSS think that the only way to go is to create a custom
class for every style. As a result, your stylesheet fills with hundreds of
indecipherable custom classes that will be a mystery to you in a few short
months away from that site.

Instead, leverage the inheritance and cascade of CSS by using your selectors
wisely. For example, if you only wanted certain images (those within a
particular table/div to have the border style, you could do this -

table.special img {border:2px dashed red; }

and that would apply ONLY to image tags within a table having a class
assignment of "special".

One neat thing would be to use this approach to specify certain styles ONLY
on certain pages, e.g.,

body#contact img {border:12px indent green; }

would apply only on this page -

<body id="contact"

See what I mean?

--
Murray
--------------
MVP FrontPage


"Don" <(E-Mail Removed)> wrote in message
news:-(E-Mail Removed)...
>
> "Steve Easton" <(E-Mail Removed)> wrote in message
> news:%23U$(E-Mail Removed)...
>> What you want to do is easy.
>>
>> All it requires is:
>>
>> img {
>> border: 1px solid;
>> border-bottom-color: Black;
>> border-right-color: Black;
>> border-left-color: #E3E3E3;
>> border-top-color: #E3E3E3;
>> }
>>
>> The above will be applied to all images in all pages that use the style
>> sheet,
>> and you will not have to apply a class.
>>
>>
>>
>> --
>> Steve Easton
>> Microsoft MVP FrontPage
>> FP Cleaner
>> http://www.95isalive.com/fixes/fpclean.htm
>> Hit Me FP
>> http://www.95isalive.com/fixes/HitMeFP.htm

>
> Steve that is fantastic. I cannot thank you enough. I have struggled
> with that for days and failed to find the answer by Googling. You are a
> star mate.
>
> Jon
>



 
Reply With Quote
 
P@tty Ayers
Guest
Posts: n/a
 
      9th Dec 2006

"Don" <(E-Mail Removed)> wrote in message
news:-(E-Mail Removed)...

> Steve that is fantastic. I cannot thank you enough. I have struggled
> with that for days and failed to find the answer by Googling...


Things like this would be easy if you would go through a beginner's book or
tutorial on CSS, seriously. Playing around and experimenting is great, but
there's a simple logic to CSS which requires some book learning, I believe.


--
Patty Ayers | www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--


 
Reply With Quote
 
Don
Guest
Posts: n/a
 
      11th Dec 2006

"Don" <(E-Mail Removed)> wrote in message
news:1M2dnZmQVZzea-(E-Mail Removed)...
>I am a total new starter when it comes to CSS but I believe I am learning
>fast. I'm stuck and wonder if I am seeking a solution that just isn't
>possible.
>
> What I would like to do is have an entry in my style sheet that dictates
> all images on a page will have a border, all parameters for that border to
> be picked up from the style sheet (thickness, colour and so on).
>
> I know I can define an entry in my sheet for example..
>
> .picdefcol {
> border: 1px solid;
> border-bottom-color: Black;
> border-right-color: Black;
> border-left-color: #E3E3E3;
> border-top-color: #E3E3E3;
> }
>
> It seems to me the only way to get the pictures to pick up the values is
> to right click on them and then apply .picdefcol via the Style button.
>
> Am I asking too much?
>
> Any advice from you experienced guys and gals would be very much
> appreciated.
>
> Thank you,
>
> Don


Thank you so much to all respondents. Your advice and guidance are very
much appreciated and taken to heart.

Don


 
Reply With Quote
 
Helpful person
Guest
Posts: n/a
 
      11th Dec 2006

Don wrote:
> I am a total new starter when it comes to CSS but I believe I am learning
> fast. I'm stuck and wonder if I am seeking a solution that just isn't
> possible.
>
> What I would like to do is have an entry in my style sheet that dictates all
> images on a page will have a border, all parameters for that border to be
> picked up from the style sheet (thickness, colour and so on).
>
> I know I can define an entry in my sheet for example..
>
> .picdefcol {
> border: 1px solid;
> border-bottom-color: Black;
> border-right-color: Black;
> border-left-color: #E3E3E3;
> border-top-color: #E3E3E3;
> }
>
> It seems to me the only way to get the pictures to pick up the values is to
> right click on them and then apply .picdefcol via the Style button.
>
> Am I asking too much?
>
> Any advice from you experienced guys and gals would be very much
> appreciated.
>
> Thank you,
>
> Don


As a beginner with css I found this web site invaluable.

http://www.w3schools.com/css/default.asp

Please visit my web site at www.richardfisher.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interesting - Is PC BUTTS impersonating PA Bear or is PA Bear also PC BUTTS? Leythos Windows XP General 33 26th Mar 2009 08:44 AM
RE: Advice needed vbasean Microsoft Access 1 5th Oct 2008 08:33 AM
Re: Advice needed Cowboy \(Gregory A. Beamer\) Microsoft ADO .NET 0 3rd Oct 2008 12:57 AM
Re: Advice needed Mike Glen Microsoft Powerpoint 1 2nd Oct 2008 10:44 PM
Re: Advice needed Monitor Windows XP Help 0 2nd Oct 2008 10:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:03 AM.