473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem positioning of a background image in a DIV

ton

Hi,

I have an Image which is dark grey/black, at the top a white line, at the
left site a white line as well.
At 192 px from the left of the screen I position a DIV with this image as
the background image. In the code I've added a multi line textbox (in my
real world it is a treeview). It is placed that I would have to scroll to
see the entire textbox. What happens is that the image will repeat itself,
this is what you expect. Because of the white line, it doesnot look nice.
But we can modify the style !!! So I change the original code:

<body id="doc"<form id="form1" runat="server">

<div id="grdWithScroll" style="z-index: 105; left: 192px;
overflow: scroll; width: 250px; position: absolute; top: 96px;
height: 480px; border-right:
1px solid; border-top: 1px solid; border-left: 1px solid;
border-bottom: 1px solid;
background-image: url(Images/Vlakmidden_tonv1.png); ">

<asp:TextBox ID="TextBox1" runat="server" Height="448px"
Style="z-index: 100; left: 24px;
position: absolute; top: 392px" TextMode="MultiLine"
Width="120px"></asp:TextBox>

</div>
</form>
</body>

background-image: url(Images/Vlakmidden_tonv1.png); background-attachment:
fixed;"

the background-attachment: fixed;" is added.
What you expect is that there will be no scrolling of the image, so no
horizontal white line in the div area. This is true, but the image is placed
at the left =0, so in the middle of the area I now got a vertical white
line.

This is strange behavior.
The source of the website is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title></title></head>
<body id="doc"<form name="form1" method="post" action="Default.aspx"
id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwULLTIwNzM2Mzc2OTBkZJsn85KnroSX4RS2imveBktL4rI 6" />
</div>
<div id="grdWithScroll" style="z-index: 105; left: 192px;
overflow: scroll; width: 250px; position: absolute; top: 96px;
height: 480px; border-right:
1px solid; border-top: 1px solid; border-left: 1px solid;
border-bottom: 1px solid;
background-image: url(Images/Vlakmidden_tonv1.png);
background-attachment: fixed;">

<textarea name="TextBox1" rows="2" cols="20" id="TextBox1"
style="height:448px;width:120px;z-index: 100; left: 24px;
position: absolute; top: 392px"></textarea>
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWAgLI5PGyDQLs0bLrBtGslYXMGixz03JmU16KAFcOkCIp" />
</div></form>
</body>

Nov 6 '08 #1
0 2685

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. ...
2
by: Dariusz | last post by:
I am trying out a fully CSS-P layout (first time with floats) and am having problems with getting certain DIV's from displaying properly - or rather - they are being completely ignored. Below is...
2
by: Sebastian Stein | last post by:
Hej, I have a table with 1 row and 2 columns. In both columns are images below each other. In the right cell are less images, so the height of this cell is smaller. Anyway, I want a...
6
by: | last post by:
I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an...
1
by: sweep | last post by:
Hi there, I am redeveloping my site to use CSS and have come up against a problem. The page I'm working on is at http://staging.proscenia.co.uk/revised%20simpler%20CSS%20floats%20version.html...
2
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
3
by: goldenboy651 | last post by:
My Positioning in IE 6 is exactly the way I want it, but when I view the page in my firefox browser things are out of place. When I try and change the css my IE page moves, but the firefox doesn't. ...
2
by: TheCruelPanda | last post by:
Hey there. My name is Rowan, and it's been three weeks since I last used tables for an HTML design. Okay, I'm rather new to CSS and I have a big positioning problem here. It might not be a...
1
by: mohammadtaha | last post by:
Hi, I am using CSS to position objects (<SPAN> and <DIV> tags) on my webpage, which is working great on regular computer monitors, when I view the same page on a wide screen laptop monitor,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.