| | |
Odd, CSS Error
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi,
I am developing a simple site and have (after it being recommended) been using CSS to handle the homepage image display. The display consists of an array of 25 (95x95 px) images aligned to form one image. CSS has allowed me to display them just as I wanted (please see homepage link above). A minor problem exists now though. I have decided to add Javascript to the page so each image rolls over upon mouse contact-- simple. This works fine. (*NOTE: the website link is pre-Javascript, not the scripted version which contains the errors) But, ever since I've added JS, I am having an odd alignment problem. I have tried everything I can think of. The original non-JS works fine, and I do not see how adding JS would cause this problem.
Attached are two screenshots of the situation:
1) Before, without JS (lower-righthand image is placed correctly)
2) After JS (lower-righthand image is placed incorrectly)
Below is a relative code-snippet for each:
1)
2)
** Both, full code versions upon request
I hope I explained this well to some extent. Basically, the image (blocked in a red rectangle, "bottomLeftCorner.jpg", in the attached BMPs) is misaligned.
Thank-you in advance for any help.
Matty
I am developing a simple site and have (after it being recommended) been using CSS to handle the homepage image display. The display consists of an array of 25 (95x95 px) images aligned to form one image. CSS has allowed me to display them just as I wanted (please see homepage link above). A minor problem exists now though. I have decided to add Javascript to the page so each image rolls over upon mouse contact-- simple. This works fine. (*NOTE: the website link is pre-Javascript, not the scripted version which contains the errors) But, ever since I've added JS, I am having an odd alignment problem. I have tried everything I can think of. The original non-JS works fine, and I do not see how adding JS would cause this problem.
Attached are two screenshots of the situation:
1) Before, without JS (lower-righthand image is placed correctly)
2) After JS (lower-righthand image is placed incorrectly)
Below is a relative code-snippet for each:
1)
<div class="thumbnail">
<a href="http://stormtrooper.webng.com/image.html"><img src="bombers.jpg" width="95" height="95" alt="" border=0></a><br>
</div>
<!-- layer 5-->
<div class="thumbnail">
<a href="http://stormtrooper.webng.com/image.html"><img src="bottomLeftCorner.jpg" width="95" height="95" alt="" border=0></a><br>
</div><div class="thumbnail">
<A href="#" onMouseOver="return changeImage18()" onMouseOut= "return changeImageBack18()" ><img name="shirtButton18" src="bombers.jpg" width="95" height="95" border="0" alt="javascript button"></A><br>
</div>
<div class="thumbnail">
<a href="http://stormtrooper.webng.com/image.html"><img src="bottomLeftCorner.jpg" width="95" height="95" alt="" border=0></a><br>
</div>I hope I explained this well to some extent. Basically, the image (blocked in a red rectangle, "bottomLeftCorner.jpg", in the attached BMPs) is misaligned.
Thank-you in advance for any help.
Matty
•
•
Join Date: Sep 2007
Posts: 176
Reputation:
Solved Threads: 20
It's been my experience that even though HTML is supposed to ignore white space, if you have a number of images you want to line up horizontally, you CANNOT have any hard returns in the code. That's right - if there is a new line in your code you might notice a small 'tick' or underscore between images. I don't know if this is your case, but it might be worth looking at.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
![]() |
Similar Threads
- css not working in IE (HTML and CSS)
- Computer stop error on XP. (Windows NT / 2000 / XP)
- quiz using form (PHP)
- Browser problem's (HTML and CSS)
- problem with windows media player 9/10 on XP (Windows 95 / 98 / Me)
- Cyclic Redundancy Check installation error (Windows NT / 2000 / XP)
- I need help with a parse error! (PHP)
- Win Min error when shutting down windows 98 (Viruses, Spyware and other Nasties)
- Bridge.dll error (Viruses, Spyware and other Nasties)
- struct error (!?) (C)
Other Threads in the HTML and CSS Forum
- Previous Thread: Question About a web gallery
- Next Thread: question about sofware
Views: 1739 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl






