Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:38 PM
Jordan Peterson
Guest
 
Posts: n/a
Default CSS equivalent of a repeating 1px-high image for a vertical backgroundstripe?

I'm trying to put a vertical blue stripe with a black border on this
page that will remain colored even if the page is scrolled in the UA.

http://maba.org/new/homeproducts/

As you can see, the stripe is there, but Gecko only draws it for the
initial viewport and chops it off if one scrolls down. MSIE stops
drawing the background color at the end of the last link on the left side.

I've messed around with the stylesheet to no end, and to no avail. Am I
missing something here?

Thanks,
Jordan
  #2  
Old July 20th, 2005, 11:38 PM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: CSS equivalent of a repeating 1px-high image for a vertical background stripe?

Jordan Peterson wrote:[color=blue]
> I'm trying to put a vertical blue stripe with a black border on this
> page that will remain colored even if the page is scrolled in the UA.
>
> http://maba.org/new/homeproducts/[/color]

You have way too much markup and CSS. It won't get any better, if you
just add more and more markup.
[color=blue]
> As you can see, the stripe is there, but Gecko only draws it for the
> initial viewport and chops it off if one scrolls down. MSIE stops
> drawing the background color at the end of the last link on the left side.[/color]

Add this to the end of your CSS, and get rid of div.body-box, as latter
causes collapsing margin thingy you don't want. (and which most likely
doesn't work with IE, and maybe not in Gecko either, so do it anyway...)

body {margin:0;padding:0;background:blue;}

div#main
{
background:#fff;
position:static;
margin-left:141px;
border-left: 2px black solid;
width: 440px
}

Replace blue with correct shade. I have not tested in IE, but you should
get the idea. As you didn't ask about that 1px white stripe, I assumed
you didn't need it to go to down. It is possible too, but a tiny bit more
complicated.
[color=blue]
> I've messed around with the stylesheet to no end[/color]

I can see. You should always save versions, so that when you get the
solution working, you don't need to use hours for removing all
unnecessary styling. There is at least 2 pagefuls of useless CSS.
[color=blue]
> Am I missing something here?[/color]

Lots. You are also using px unit to measure text width. No good, use em
instead.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles