Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2009, 11:47 AM
Authorized User
 
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Question problem wraping around an image

I'm trying to have the output appear all on the same line in html
In the case below it should look like 1 2 3 4 5 6
but is displaying as

1
23456

1 being an image with a 1 over it.

If the image were say a 3 it is appearing as
1 2
3
4 5 6

See code below


css file
.textposition {text-align:center; font-size:10px; margin-top:5px}
.pagenumimage {background:url('../images/PageNum.gif') no-repeat; width: 14px; height: 18px; }

html
<tr><td colspan=2 align=center class="nowrap">
<div class="pagenumimage"><div class="textposition">1</div></div>&nbsp;
<a class="periwinkle" href="test.asp?p=2">2</a>
<a class="periwinkle" href="test.asp?p=3">3</a>
<a class="periwinkle" href="test.asp?p=4">4</a>
<a class="periwinkle" href="test.asp?p=5">5</a>
<a class="periwinkle" href="test.asp?p=6">6</a>
</td></tr>


Any ideas why it is wraping ?
 
Old September 18th, 2009, 12:16 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Instead you can have simple image tag

Code:
<img src="../images/PageNum.gif" border="0">
<a class="periwinkle" href="test.asp?p=2">2</a>
<a class="periwinkle" href="test.asp?p=3">3</a>
<a class="periwinkle" href="test.asp?p=4">4</a>
<a class="periwinkle" href="test.asp?p=5">5</a>
<a class="periwinkle" href="test.asp?p=6">6</a>
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old September 18th, 2009, 02:57 PM
Authorized User
 
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by om_prakash View Post
Instead you can have simple image tag

Code:
<img src="../images/PageNum.gif" border="0">
<a class="periwinkle" href="test.asp?p=2">2</a>
<a class="periwinkle" href="test.asp?p=3">3</a>
<a class="periwinkle" href="test.asp?p=4">4</a>
<a class="periwinkle" href="test.asp?p=5">5</a>
<a class="periwinkle" href="test.asp?p=6">6</a>
Thanks for the reply,

I had thought of doing that way but the number of pages is created dynamically.
So at any given time I could have 50 pages. I didn't want to create 50 images depending on the number. The method I'm using works great except for the wraping issue.
 
Old September 19th, 2009, 04:19 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

In that case you can also try:

Code:
 
<style>
textposition {text-align:center; font-size:10px; margin-top:5px}
.pagenumimage {background:url('user_online.gif') no-repeat; width: 14px; height: 18px; }
</style>
 
<table>
<tr>
<td class="pagenumimage">1</td>
<td><a class="periwinkle" href="test.asp?p=2">2</a></td>
<td><a class="periwinkle" href="test.asp?p=3">3</a></td>
<td><a class="periwinkle" href="test.asp?p=4">4</a></td>
<td><a class="periwinkle" href="test.asp?p=5">5</a></td>
<td><a class="periwinkle" href="test.asp?p=6">6</a></td>
</tr>
</table>
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Image problem beetle_jaipur Classic ASP Professional 4 March 30th, 2009 04:39 PM
Wraping text to a new row Morry Excel VBA 3 February 27th, 2004 03:08 PM
image problem... life_s Ng ASP.NET 1.0 and 1.1 Basics 2 September 29th, 2003 02:42 AM
image display problem please help mateenmohd Classic ASP Databases 2 June 7th, 2003 01:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.