• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Website Design Codes

Bman

OSNN Veteran Original
#1
See the outlined border, how do you code something like that?

So that it stretches when you ad text and images to it...
 
Last edited:

muzikool

Act your wage.
Political User
#2
If you're coding in CSS then it should be pretty easy. Sometimes sites like that that have "shadows" around the container are actually using images for the top and bottom, along with repeating images for the rest of the container.

In your example you would have a 1px tall image that is the width of the container plus some extra on either end. The left and right ends of the image would have the blue background color and gray border, and the middle would be the greenish brown color of the container. This image would repeat down the page as much as needed for the content to fit. The top and bottom of the container would be separate images with the border added to the top or bottom of the image. Using DIVs you would code this into a stylesheet.
 

Bman

OSNN Veteran Original
#3
I wouldn't know how to code that, I am doing this website to basically learn and get better at html and css.

What would I put into the css sheet, got a template or a beginning for me?
 

Bman

OSNN Veteran Original
#6
Ok, forget all that.

I have a bunch of links (the menu), and a banner (just a box) on the top.

I want the banner to change images, when someone hovers over the links.


How is this done?

I'm writing in XHTML & CSS.
 

muzikool

Act your wage.
Political User
#7
Ok, forget all that.

I have a bunch of links (the menu), and a banner (just a box) on the top.

I want the banner to change images, when someone hovers over the links.


How is this done?

I'm writing in XHTML & CSS.
That will probably require JavaScript. You learning that as well?
 

AllWeatherGal

Not Just for Fair Weather
Political User
#8
an excellent javascript library for you (and everyone):

http://simplythebest.net/scripts/DHTML_scripts/

I'm sure there's a script in there that'll do what you want. I've found scripts in there to be very easy to use/implement, robust, and well-designed.

Just, please ... give the authors credit in your code.

And oh... you'll probably need to add the js in "code" mode rather than "design" ... I've only used scripts from here when hand-coding.
 
#9
or, you can make it in to a link, and change the background in CSS for when the mouse is over it.

a:link {background:bird.jpg;} --- this is what it looks like with no activity
a:hover {background:dog.jpg;} --- when the mouse is over it
a:focus {background:dog.jpg;} ---- when someone uses the tab key to move around (mostly used for accessability.)
a:active {background:none;} --- when the mouse is clicked down.
a:visited {background:bird.kpg;}
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies