Customizing PBASE (Part 1: Borders Around Images)

El-See

Senior Member
Messages
2,167
Reaction score
0
Location
US
Mark L. said:
Very nice photos. I have an unrelated question though. How did
you change the background pattern and borders on your pictures on
pbase? I can't seem to figure out how to do more than simply
change the background color. Thanks for your help.
Mark, since your question was different from the original thread, I decided to tease it out into a new thread. Over the last few days a few others have asked similar questions. Since many of you are using PBASE to display (that is when it's not being finicky) hopefully this will be of help and not just a bunch of jibberish -- actually customizing PBASE isn't that difficult with a few pointers in the right direction. This first post will focus on borders, the next (when I get a chance) will focus on customizing background patterns or images as backgrounds.

Creating Borders in PBASE

A border around pictures is a function of a Cascading Style Sheet or in computer lingo referred to as CSS. You can easily create a custom CSS within the 'Edit Gallery' section of the PBASE web applicaton. Since you have already created a custom style for your galleries with a unique background color, I'll keep my focus only on borders. Here is my example of borders using a cascading style sheet:

http://www.pbase.com/charette/yosemite/
http://www.pbase.com/charette/sunsets_on_the_james/

What makes borders a little challenging is that the default code that is generated when you create a custom style sheet does not include the lines of code needed for borders. Not a problem though, you will just have to insert the following lines of code at the end of your style sheet to create the border:

IMG.thumbnail {
border-style : inset;
border-width : 3pt;
border-color : #6666cc;
}

IMG.display {
border-style : inset;
border-width : 5pt;
border-color : #6666cc;
}

WHAT DOES THE CODE MEAN: The first group of code creates borders around the thumbnail display, while the second group of code creates the border around picture display.The three commands included in each grouping, control various aspects of the border.

1) Border-style: has several options: {border-style: dotted},{border-style: dashed}.{border-style: solid}, {border-style: double}, {border-style: groove}, {border-style: ridge},{border-style: inset}, and {border-style: outset}. I have selected the 'Inset' style for the Yosemite gallery and a solid white border in other galleries. The code for solid white would look like this:

IMG.thumbnail {
border-style : solide;
border-width : 3pt;
border-color : white;
}

2) Border-width: can be set to any point size depending on your preference. BTW, you can control the width of each part of the border if you really want to go crazy. For example:
{
border-style: ridge;
border-right-width: 10px
}

3) Border-Color: again is determined by your preference. I have set my color to a shade or two off from my background (e.g. bkgrnd=#333366.)

For more on the various CSS style command available, visit this excellent tutorial: http://www.w3schools.com/css/

Hope this helps, sorry to be long winded. -- LC

--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
Very nice photos. I have an unrelated question though. How did
you change the background pattern and borders on your pictures on
pbase? I can't seem to figure out how to do more than simply
change the background color. Thanks for your help.
Mark, since your question was different from the original thread, I
decided to tease it out into a new thread. Over the last few days
a few others have asked similar questions. Since many of you are
using PBASE to display (that is when it's not being finicky)
hopefully this will be of help and not just a bunch of jibberish --
actually customizing PBASE isn't that difficult with a few pointers
in the right direction. This first post will focus on borders, the
next (when I get a chance) will focus on customizing background
patterns or images as backgrounds.

Creating Borders in PBASE

A border around pictures is a function of a Cascading Style Sheet
or in computer lingo referred to as CSS. You can easily create a
custom CSS within the 'Edit Gallery' section of the PBASE web
applicaton. Since you have already created a custom style for your
galleries with a unique background color, I'll keep my focus only
on borders. Here is my example of borders using a cascading style
sheet:

http://www.pbase.com/charette/yosemite/
http://www.pbase.com/charette/sunsets_on_the_james/

What makes borders a little challenging is that the default code
that is generated when you create a custom style sheet does not
include the lines of code needed for borders. Not a problem though,
you will just have to insert the following lines of code at the end
of your style sheet to create the border:

IMG.thumbnail {
border-style : inset;
border-width : 3pt;
border-color : #6666cc;
}

IMG.display {
border-style : inset;
border-width : 5pt;
border-color : #6666cc;
}

WHAT DOES THE CODE MEAN: The first group of code creates borders
around the thumbnail display, while the second group of code
creates the border around picture display.The three commands
included in each grouping, control various aspects of the border.

1) Border-style: has several options: {border-style:
dotted},{border-style: dashed}.{border-style: solid},
{border-style: double}, {border-style: groove}, {border-style:
ridge},{border-style: inset}, and {border-style: outset}. I have
selected the 'Inset' style for the Yosemite gallery and a solid
white border in other galleries. The code for solid white would
look like this:

IMG.thumbnail {
border-style : solide;
border-width : 3pt;
border-color : white;
}

2) Border-width: can be set to any point size depending on your
preference. BTW, you can control the width of each part of the
border if you really want to go crazy. For example:
{
border-style: ridge;
border-right-width: 10px
}

3) Border-Color: again is determined by your preference. I have set
my color to a shade or two off from my background (e.g.
bkgrnd=#333366.)

For more on the various CSS style command available, visit this
excellent tutorial: http://www.w3schools.com/css/

Hope this helps, sorry to be long winded. -- LC

--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
Thanks so much. I really appreciate all of the time you put into your explanation. I'll have to try those out as soon as I get home. I look forward to the next part.

Mark L.
Very nice photos. I have an unrelated question though. How did
you change the background pattern and borders on your pictures on
pbase? I can't seem to figure out how to do more than simply
change the background color. Thanks for your help.
Mark, since your question was different from the original thread, I
decided to tease it out into a new thread. Over the last few days
a few others have asked similar questions. Since many of you are
using PBASE to display (that is when it's not being finicky)
hopefully this will be of help and not just a bunch of jibberish --
actually customizing PBASE isn't that difficult with a few pointers
in the right direction. This first post will focus on borders, the
next (when I get a chance) will focus on customizing background
patterns or images as backgrounds.

Creating Borders in PBASE

A border around pictures is a function of a Cascading Style Sheet
or in computer lingo referred to as CSS. You can easily create a
custom CSS within the 'Edit Gallery' section of the PBASE web
applicaton. Since you have already created a custom style for your
galleries with a unique background color, I'll keep my focus only
on borders. Here is my example of borders using a cascading style
sheet:

http://www.pbase.com/charette/yosemite/
http://www.pbase.com/charette/sunsets_on_the_james/

What makes borders a little challenging is that the default code
that is generated when you create a custom style sheet does not
include the lines of code needed for borders. Not a problem though,
you will just have to insert the following lines of code at the end
of your style sheet to create the border:

IMG.thumbnail {
border-style : inset;
border-width : 3pt;
border-color : #6666cc;
}

IMG.display {
border-style : inset;
border-width : 5pt;
border-color : #6666cc;
}

WHAT DOES THE CODE MEAN: The first group of code creates borders
around the thumbnail display, while the second group of code
creates the border around picture display.The three commands
included in each grouping, control various aspects of the border.

1) Border-style: has several options: {border-style:
dotted},{border-style: dashed}.{border-style: solid},
{border-style: double}, {border-style: groove}, {border-style:
ridge},{border-style: inset}, and {border-style: outset}. I have
selected the 'Inset' style for the Yosemite gallery and a solid
white border in other galleries. The code for solid white would
look like this:

IMG.thumbnail {
border-style : solide;
border-width : 3pt;
border-color : white;
}

2) Border-width: can be set to any point size depending on your
preference. BTW, you can control the width of each part of the
border if you really want to go crazy. For example:
{
border-style: ridge;
border-right-width: 10px
}

3) Border-Color: again is determined by your preference. I have set
my color to a shade or two off from my background (e.g.
bkgrnd=#333366.)

For more on the various CSS style command available, visit this
excellent tutorial: http://www.w3schools.com/css/

Hope this helps, sorry to be long winded. -- LC

--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
--
http://www.pbase.com/quikag

When I first heard that Marge was joining
the police academy, I thought it would be
fun and zany, like that movie, Spaceballs.
But instead it was dark and disturbing, like
that movie -- Police Academy.

-- Homer Simpson
 
Thank you very much for posting the tutorial and code. I cut and
pasted your code into Pbase, works great. I am excited about
learning the usage of this HTML code.

Thanks again
Rich,

Great, I'm glad it worked for you. Now the next hurdle is for you prersonalizing it, chosing a border color that complements your background and bright titles. Good luck, -- LC
--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
Thanks so much for the tips. I Finally got around to doing borders,
and the photos look much better. Previously, I had figured out how
to change colors, but creating frames was foreign.
Hey Ron,

Your site is looking sharp. I'm glad my totorial could be of help. Since you selected the 'double' border style for your tumbnail images, you might be interested in knowing that you can customize this style to light up when the mouse passes over the thumbnail.

Currently this code is in your style sheet:

A:link { color : #486591}
A:active { color : #d5ae83}
A:visited { color : #204863}
A:hover { color : #5b80b7}

If your add the following code to the hover tag:

A:hover { color : #5b80b7; background-color: gold;}

your thumbnails would light up a the mouse passed over them. Maybe not everyones cup of tea, but another effect. As always, the colors can be changed to your preference. -- LC

--
--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
I tried it and I like the effect. Thanks again.

How did you learn how to do all this? And thanks for sharing; please continue with these useful tips.

Ron
 
I tried it and I like the effect. Thanks again.

How did you learn how to do all this? And thanks for sharing;
please continue with these useful tips.
Hey Ron,

Glad you liked the effect. I took a look at your source code and you should add a space between the ; and Background-color label in the hover tag:

A:hover { color : #5b80b7; background-color:gold;}

Many web browsers are not so forgiving and the effect will be skipped over if it can't be read.

As to how (why) I learned this stuff. I have been working with web sites since around '95. For me, this stuff clicks and I understand it. Digital Cameras are little more challenging :-) If can contribute something positive to this forum then it is a small thing compared to all I have received. -- LC

--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
It seems to work; should I make the change?

Ron
Hey Ron,

Glad you liked the effect. I took a look at your source code and
you should add a space between the ; and Background-color label in
the hover tag:

A:hover { color : #5b80b7; background-color:gold;}

Many web browsers are not so forgiving and the effect will be
skipped over if it can't be read.

As to how (why) I learned this stuff. I have been working with web
sites since around '95. For me, this stuff clicks and I understand
it. Digital Cameras are little more challenging :-) If can
contribute something positive to this forum then it is a small
thing compared to all I have received. -- LC

--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
It seems to work; should I make the change?
Ron,

Yep, the space is needed. Your code works on a PC using Internet Explorer but not on a Mac. Computers are particular, they like the code to be exact. I always test code against a variety of machines. Of course this is only important if your gallery is opened to the world. :-) - LC
--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 
I made the change; does it look OK?

Ron
It seems to work; should I make the change?
Ron,

Yep, the space is needed. Your code works on a PC using Internet
Explorer but not on a Mac. Computers are particular, they like the
code to be exact. I always test code against a variety of machines.
Of course this is only important if your gallery is opened to the
world. :-) - LC
--
El-See ('cause LC and Leo were taken )
http://www.pbase.com/charette
 

Keyboard shortcuts

Back
Top