BenC Posted July 3, 2006 Share Posted July 3, 2006 I was wondering if it is possible to have the border start at a fixed point instead of at 0. I want to have a border down the side of a div, but not start it until about 200px from the top, is that possible? Link to comment Share on other sites More sharing options...
S@m Posted July 3, 2006 Share Posted July 3, 2006 Do you have an example of what you are trying to do? I can't picture why you would want to do that. Link to comment Share on other sites More sharing options...
BenC Posted July 3, 2006 Author Share Posted July 3, 2006 Here is a link to an image to illustrate what I am looking for. The yellow line is where I need the border. After looking at it, I think I can put another one on the left, and just start it from where "2" ends. "1" changes height depending on the amount of content in it though, I'll keep messing with it unless you have a better idea than mine. Thanks!http://www.courts.mo.gov/hosted/Juded/Webc...ordersample.jpg Link to comment Share on other sites More sharing options...
Chocolate570 Posted July 3, 2006 Share Posted July 3, 2006 From what I know, it's not possible with one element. What you coudl do is position 2 divs (on top of eachother). The first div would be 200 px high and x px wider on each side than the inner element--where x is how big the border should be. The second div should be the same, except more in height, and then you just change the background color to the color of your border. Link to comment Share on other sites More sharing options...
S@m Posted July 3, 2006 Share Posted July 3, 2006 ...exactly what Chocolate570 said is what I would try. Link to comment Share on other sites More sharing options...
BenC Posted July 3, 2006 Author Share Posted July 3, 2006 Thanks for the suggestion. I've been trying it out like that, but I think I'm running into a problem because the height is in a %, not pixels. The layer that is under won't go all the way down to the bottom of the page like the one on top, presumably because it doesn't have any content in it. Would you mind showing me the code to something like that? I'm relativaly new to css by the way, in case you couldn't tell I'll keep messing with it to figure something out. Thanks guys! Link to comment Share on other sites More sharing options...
Chocolate570 Posted July 3, 2006 Share Posted July 3, 2006 Hmm...well, what you could do is somehow put a filler element inside the border element. And then put a height=100% for it. Put a z-index of lower than the upper element, and what you should get is what you need Link to comment Share on other sites More sharing options...
BenC Posted July 5, 2006 Author Share Posted July 5, 2006 I've been messing around with it, and from what I can tell height=100% still doesn't really do anything for me. What is it "100%" of? Iteself? the page? Here's what I've done, I've created a layer and gave it this class....leftside { border-right:1px solid #cccc99; position:absolute; top:380px; left:117px; height:100%; z-index:1001; width: 52px;}I had hoped that it would continue down the page, but it only goes for about 50px or so and stops, that's why I asked about the 100%. Link to comment Share on other sites More sharing options...
aspnetguy Posted July 5, 2006 Share Posted July 5, 2006 height = 100% means different things in different browsers. It is hard to get it to work how you want and the smallest changes can break it.I like to use background images to simulate this instead. Link to comment Share on other sites More sharing options...
BenC Posted July 5, 2006 Author Share Posted July 5, 2006 I tried using a background image too, but ran into the problem of it not looking right depending on what the resolution and window size is. Link to comment Share on other sites More sharing options...
aspnetguy Posted July 5, 2006 Share Posted July 5, 2006 I tried using a background image too, but ran into the problem of it not looking right depending on what the resolution and window size is.<{POST_SNAPBACK}> True, that method only works with fixed width sites. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now