How can I make a strip that goes from a specific point to all the way to the right regardless of screen resolution?
I am intending to have a header with an image I can repeat starting from about the middle (float:left; to position it) and I'd like it to reach the very rig开发者_StackOverflow中文版ht side no matter screen resolution here's what I have so far:
<div id="strip"></div>
css:
#strip{width:1px;height:302px;background:url('repeat.png') 0 0 repeat-x;float:left;}
any idea how to accomplish this?
div#strip {
border: 1px solid black;
height: 20px;
margin-left: 50%;
}
Div is a block element, and will automatically try to fill up all the available width.
JSFiddle here: Link
Is it something like this?
http://jsfiddle.net/aniketpant/426LB/
It's just that the width needs to be set at 100% and it's done.
Try this (I changed Aniket's fiddle)
Added css:
body {overflow-x:hidden}
#strip {margin-left:50%}
Demo: http://jsfiddle.net/426LB/4/
精彩评论