Adding just a background color vertical bar down, need help

rebrofactor
avatar
rank newbie

newbie


Posts: 5
Joined: 2008-05-19

I'm a noob, but hopefully someone can help.

I'm trying to style a WP layout. At the moment it looks like this.

http://www.nekopi.com/

Kept trying to add a new bar by the side, to look like this.

http://www.nekopi.com/troubled.jpg (notice the pink line)

Can i just use a background-color attribute, width and run it down? Where should it be declared? Outside the container?

Please advice.

ifohdesigns
ifohdesigns's picture
rank Enthusiast

Enthusiast


Posts: 273
Joined: 2008-02-22
Location: Providence, RI

What will this bar be used

What will this bar be used for, anything, or is it just looks? If it is just for a background, you could just make it a background image for the body, or wrapper div and have it repeat down the side.

http://ifohdesigns.com - Web Design That Is Neat.
http://ifohdesigns.com/blog - Read it please.

rebrofactor
rebrofactor's picture
rank newbie

newbie


Posts: 5
Joined: 2008-05-19

A wrapper div would probably

A wrapper div would probably be the solution, won't have anything on it. How would i be able to style that line down with a css div wrap?

stinkysGTI
stinkysGTI's picture
rank Regular

Regular


Posts: 26
Joined: 2007-06-08
Location: San Diego

Add a new div to contain

Add a new div to contain everything, then create an image of just that pink line that's only 1px tall. When you get those two, then you can add the css:

#container {
background:url("path/to/image") repeat-y;
}

and that should be it Smiling

ifohdesigns
ifohdesigns's picture
rank Enthusiast

Enthusiast


Posts: 273
Joined: 2008-02-22
Location: Providence, RI

make sure the wrapper goes

make sure the wrapper goes around all of your content, then make a small image as wide as that pink bar is, and 1px tall, then set it to repeat-y

#wrapper {
     background: url(your-image.gif) repeat-y top left;
     }

http://ifohdesigns.com - Web Design That Is Neat.
http://ifohdesigns.com/blog - Read it please.

stinkysGTI
stinkysGTI's picture
rank Regular

Regular


Posts: 26
Joined: 2007-06-08
Location: San Diego

sorry to step on your toes

sorry to step on your toes ifoh Smiling

when I get bored at work, I just browse forums to try and help people out

rebrofactor
rebrofactor's picture
rank newbie

newbie


Posts: 5
Joined: 2008-05-19

fantastic, thank you to you

fantastic, thank you to you two. this is the first time i get response so fast for coding help. thank you so much.

let me test it out and get back to you two css gurus.

ifohdesigns
ifohdesigns's picture
rank Enthusiast

Enthusiast


Posts: 273
Joined: 2008-02-22
Location: Providence, RI

ha, not a prob. After I

ha, not a prob. After I posted, I was like oh *beep*, done and done.

http://ifohdesigns.com - Web Design That Is Neat.
http://ifohdesigns.com/blog - Read it please.

rebrofactor
rebrofactor's picture
rank newbie

newbie


Posts: 5
Joined: 2008-05-19

Managed to get the line

Managed to get the line there, thanks! but, my #cmheader bg went missing, any idea why?

#cmheader { width: 1024px; height: 45px;  margin: 0 auto; padding: 0; background: url('images/cmheader.gif') 50% 0 no-repeat; display:block; text-align: left;}

#wrapper { background: url('images/bg.gif') repeat-y top left; }

<body class="custom">
<div id="cmheader"><div id="wrapper">
<div id="container">
</div></div></div>

stinkysGTI
stinkysGTI's picture
rank Regular

Regular


Posts: 26
Joined: 2007-06-08
Location: San Diego

It could be the 50%

It could be the 50% coordinate in the background value, or it's being overlapped by another element.

If you remove everything else, or just that new line, does it show up?

rebrofactor
rebrofactor's picture
rank newbie

newbie


Posts: 5
Joined: 2008-05-19

you're absolutely right,

you're absolutely right, #wrapper actually overlapped #cmheader, are there anyway to work around this one? (I could see #cmheader for a slight second before #wrapper laps it)

stinkysGTI
stinkysGTI's picture
rank Regular

Regular


Posts: 26
Joined: 2007-06-08
Location: San Diego

You could try applying that

You could try applying that pink image to be body instead of a div, or apply margin to the overlapping div to move it out of the way [if your content permits]