CSS - Advice needed - Please Bear With Me

CSS - Advice needed - Please Bear With Me

am 09.12.2006 00:33:20 von DFS

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

Re: CSS - Advice needed - Please Bear With Me

am 09.12.2006 00:37:48 von Steve Easton

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" wrote in message news:1M2dnZmQVZzea-TYnZ2dnUVZ8sWhnZ2d@pipex.net...
>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
>

Re: CSS - Advice needed - Please Bear With Me

am 09.12.2006 00:48:56 von DFS

"Steve Easton" wrote in message
news:%23U$VhHyGHHA.4580@TK2MSFTNGP05.phx.gbl...
> 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

Re: CSS - Advice needed - Please Bear With Me

am 09.12.2006 03:45:50 von Steve Easton

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" wrote in message news:-vqdnWWadflwZOTYnZ2dnUVZ8tu3nZ2d@pipex.net...
>
> "Steve Easton" wrote in message news:%23U$VhHyGHHA.4580@TK2MSFTNGP05.phx.gbl...
>> 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
>

Re: CSS - Advice needed - Please Bear With Me

am 09.12.2006 13:29:02 von Murray

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 -


See what I mean?

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


"Don" wrote in message
news:-vqdnWWadflwZOTYnZ2dnUVZ8tu3nZ2d@pipex.net...
>
> "Steve Easton" wrote in message
> news:%23U$VhHyGHHA.4580@TK2MSFTNGP05.phx.gbl...
>> 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
>

Re: CSS - Advice needed - Please Bear With Me

am 09.12.2006 19:38:24 von pattyayersTAKETHISOUT

"Don" wrote in message
news:-vqdnWWadflwZOTYnZ2dnUVZ8tu3nZ2d@pipex.net...

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

Re: CSS - Advice needed - Please Bear With Me

am 11.12.2006 11:40:34 von DFS

"Don" wrote in message
news:1M2dnZmQVZzea-TYnZ2dnUVZ8sWhnZ2d@pipex.net...
>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

Re: CSS - Advice needed - Please Bear With Me

am 11.12.2006 17:35:39 von Helpful person

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