Forum Moderators: mack

Message Too Old, No Replies

Javascript or HTML problem...Inline images? DWMX

How do I get javascript images to appear on the same line in Dreamweaver?

         

alcheme

8:02 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



I cannot get these two javascript images to appear on the same line. The go one above the other no mater what I do.

Is the a feature in Dreamweaver, HTML code, CSS style, or javascript code I can make them go on the same line?

----------

<script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script>

&

<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script>

----------

skipfactor

8:41 pm on Aug 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was able to line them up with a table & a few shims:

<table border="0" cellpadding="10" cellspacing="0">
<tr>
<td rowspan="3"> <script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script> </div>
</td>
<td><div align="right"></div></div>
<img src="/images/shim.gif" width="24" height="22"> </td>
</tr>
<tr>
<td><script language=javascript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script></td>
</tr>
<tr>
<td><img src="/images/shim.gif" width="24" height="8"></td>
</tr>
</table>

alcheme

9:06 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



I tried making a table but the two images were not aligned horizontally perfect.

I then tried yours and they were aligned perfect but there was a small box that appeared above the Script images with an X in it. I realize that is from the shim.gif but what is the shim.gif for?

What should I try now?

alcheme

9:25 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



I got it working but now there is a double space between the scripts and the horizontal lines.

What can I do about that?

<hr color="#FFFFFF">
<table width="24%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td valign="top"><script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script>&nbsp;</td>
<td valign="top"><script language=javascript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script>&nbsp;</td>
</tr>
</table>
<hr>

skipfactor

9:36 pm on Aug 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use the exact code I pasted above. Create a 5px x 5px transparent image in Fireworks, export it as "shim.gif" to a new "images" folder in your root directory. Maintain the shim sizes in the code above & it should line up for you.

alcheme

10:27 pm on Aug 19, 2003 (gmt 0)

10+ Year Member



Right, I have things lined up using a table and (top) vertically aligning the cells but an invisible line break appears below the table when my brower (IE6) opens it.

I am looking for a coded way (CSS, HTML) to solve the line break problem now.

~Shane

__________________________________________________________

<hr color="#FFFFFF">
<a name="Weather"></a>
<table width="24%" border="0" align="center" cellpadding="10" cellspacing="2">
<tr align="center" valign="top">
<td nowrap><div align="center">
<script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script></div></td>
<td nowrap><div align="center">
<script language=JavaScript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script>
</div></td>
</tr>
</table>
<hr>

traffik daddy

11:59 am on Aug 21, 2003 (gmt 0)

10+ Year Member



Try this:

<hr color="#FFFFFF">
<table width="24%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script>
</td>
<td valign="top"><script language=javascript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script>
</td>
</tr>
</table>
<hr>

Further up your post you used &nbsp in your code, this was the cause of the double break. Once removed then it will become a single line break.

Terry