Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

span question 1

Status
Not open for further replies.

whateveragain

Programmer
Apr 20, 2009
92
US
I have an online catalogue. I'm trying to get the pictures to float right of the text. I'm using the following code. Some of the items display the picture and some do not. All have the same code, but with different item #'s. What would cause Span code to sometimes work and sometimes not? What would a work-around be? Thanks

<span style="float: right"><a href="99034black.html" alt=""
width="145" height="139" ><img class="float_right" src="./images/b/s/99034black.jpg"
alt="image" width="200" /></a></span>
 
Try getting rid of the span and just float the image itself. The width and height parameters are unecessary.

Code:
<a href="99034black.html" alt=""><img style='float:right;' src="./images/b/s/99034black.jpg" alt="image"></a>



Keith
 
Obviously, I'm a newbie. Your code was what I was originally looking for. I tried the following:

<a href="99034black.html" alt="" ><img style='float:right;' src="./images/b/s/99034black.jpg" alt="image" width="199" height="194">

It still doesn't work. Is there any code surrounding that may effect the display? The following is the code for the entire item for sale:

<p><form action=" enctype="application/x- method="post"><input name="cmd" type="hidden" value="_cart" /> <input name="business" type="hidden" value="pjhandbags33@verizon.net" /> <input name="item_name" type="hidden" value="99034 100% High quality Sheepskin Leather Bag" /> <input name="item_number" type="hidden" /> <input name="amount" type="hidden" value="125" /> <input name="currency_code" type="hidden" value="USD" /> <input name="shipping" type="hidden" value="10" /> <input name="shipping2" type="hidden" /> <input name="handling_cart" type="hidden" /> <input name="bn" type="hidden" value="ButtonFactory.PayPal.001" /> <input name="add" src="/images/add.jpg" type="image" /></form><p><a href="99034black.html" alt="" ><img style='float:right;' src="./images/b/s/99034black.jpg" alt="image" width="199" height="194"></a><p>99034 100% High quality Sheepskin Leather Bag <br />Color: Black or Red <br />Dble handles approx. 20" <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13.5"L * 5.5" H * 1.25" W<br />Fashionable tassels with golden nails decoration<br/>1 phone holder & 1 zippered pocket inside<br /><strong>PRICE $125<br /></strong><br /><br /></p>

Thanks
 
I forgot to tell you that it works on my computer, but once I upload it to the site, it doesn't work. Different version of HTML?
 
I found out the problem. I changed the picture file from jpg to gif. The picture file size was too large for this code.
 
When posting code on the forum, place your code between tags - it makes it easier for us to read.
[ code ] your code here
[/ code ]
(remove the spaces from within the tages for the codes to be recognised)

File size should not make a difference, except for time taken to load it.
How many products do you have to create pages for?
If more than just a few, it would be worth considering a server side scripted solution rather than individual pages.

Keith
 
Keith,

You're right. I thought making the files smaller would work. It worked at first then stopped. So whatever is going on, it works, then stops working. How would a server side scripted solution work? Would I store the pictures in a table, use the same html page over and over and only change the pictures?

Code:
<p><form action="[URL unfurl="true"]https://www.paypal.com/cgi-bin/webscr"[/URL] enctype="application/x-[URL unfurl="true"]www-form-urlencoded"[/URL] method="post">
<input name="cmd" type="hidden" value="_cart" /> 
<input name="business" type="hidden" value="pjhandbags33@verizon.net" /> 
<input name="item_name" type="hidden" value="99651 100% Italian genuine sheepskin Bag" /> 
<input name="item_number" type="hidden" /> 
<input name="amount" type="hidden" value="129" /> 
<input name="currency_code" type="hidden" value="USD" /> 
<input name="shipping" type="hidden" value="10" /> 
<input name="shipping2" type="hidden" /> 
<input name="handling_cart" type="hidden" /> 
<input name="bn" type="hidden" value="ButtonFactory.PayPal.001" /> 
<input name="add" src="/images/add.jpg" type="image" /> </form><span style="float: right">
<a href="99651blue.html" alt="" width="145" height="139" >
<img class="float_right" src="./images/b/s/99651blue.jpg" alt="image" width="200" /></a></span>99651 100% Italian genuine sheepskin Bag<br />Size: 14.1"L x 4.25" W x 10" H<br />Color: Blue, Shimmery Gold<br />22” double chain handles surrounded leather<br/>Zipped pocket at back<br/>2 interior zipped pkts and 2 open pouches<br/>Durable inside linning with center zippered <br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;compartment that divides the bag into two sections<br/>
<strong>PRICE $129<br /></strong><br /><br /></p>
</form>

[/end code]
 
The majority of ecommerce is done thru PayPal. I have to keep expenses as low as possible for my client. I considered your response, but don't see the point in having a server handle graphics because PayPal will be doing the rest. I realize you didn't know this, but this brings me back to my initial problem. Any ideas?
 
When you say the code 'doesn't work' - what is diaplayed?


With regard to server side control of a retail website, this method offers full control over which articles are displayed. I pulled this explanantion from my website to explain further.

If your website consists of just a few pages, the content is easy to manage and editing is quite straight forward. If, however, your website consists of a large number of pages then editing them individually turns into an impossible task. The answer is to automate the pages so that they are created, on demand, by the website itself from files or a database. All this operation is totally transparent to both you and your visitors but it makes the whole process of managing your website a whole lot easier.

Database driven websites are ideal for web shops or any website which displays multiple items. Most web shops have pages displaying a selection of products and then an option to find out more details about that particular product.

The time consuming pastime of creating a separate page for each product, on a site with a large stock range is unnecessary. When the details of each product are stored in a database, a range of items, or an individual item can be selected to appear in a pre-prepared page so rather than edit multiple pages you only have to edit the product details, making it easier to keep your product range up to date and your pages uniform.

If yours is a retail business, you probably have your stock range in a database already and such information can be regularly uploaded to your website, saving you even more time. It is also possible to automtically upload your stock range to the website at regular intervals leaving you to get on with running your business and your website up to date.



Keith
 
My problem turned out to be that the site is case sensitive; whereas, my computer is not.

I REALLY appreciate the database/automated update info. I was curious about that method. I can't use it in this case because my client isn't going to want a monthly fee. She's using one of those $5/mo sites.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top