Forums / Templates, Stylesheets, Page Layout / Wrapping text around image, and borders not working in IE

Wrapping text around image, and borders not working in IE

Locked

Started by timmyneal on 9 Nov 2009, 6:49 PM · Views: 3,652

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
9 Nov 2009, 6:49 PM
#1
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Wrapping text around image, and borders not working in IE

Version 1.3.8a
No addons

I'm using the Define Page Editor to add an image to my define_main_page.php. I got the image loaded OK, but I can't seem to get the text to wrap in IE8. The text does wrap when viewed in Firfox 3.5.3, and Chrome 3.0.195.27. You can see what I mean if you look at https://www.woodworksbytim.com. I'm using the ALIGN="left" command.

I'm also attempting to place a border around the image using the BORDER command. The border shows up in the define page editor, but not in any browser.

Can anyone help. Thanks.

9 Nov 2009, 6:54 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

Your site is down for maintenance.

Alert us when you make it live again.

20 years a Zencart User

10 Nov 2009, 4:34 AM
#3
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

Sorry about that. The site is now active. Thanks.

10 Nov 2009, 8:13 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,890
Plugin Contributions:
20

Re: Wrapping text around image, and borders not working in IE

Maybe is the second and incorrect border=2

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Nov 2009, 3:52 PM
#5
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

I tried removing the border statement entirely, but it had no effect on the problem with the text wrapping around the graphic. I'm not too concerned with the border since I could just make it part of the graphic. I do need to get the text alignment problem fixed. I'm including the snippet of code hoping that someone might spot the problem. This code starts at the very top of the define_main_page.php file. Any help is greatly appreciated. Thanks.

<p><img style="WIDTH: 250px; HEIGHT: 286px" border="0" hspace="4" vspace="4" align="left" src="http://woodworksbytim.com/images/Products/spicebox_FPage.jpg" width="250" height="286" />WoodWorksbyTim produces
10 Nov 2009, 5:35 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Wrapping text around image, and borders not working in IE

You have put a lot of tag soup in that <img>! You have <img style="WIDTH: 250px; HEIGHT: 286px" border="0" hspace="8" vspace="4" align="left" src="http://woodworksbytim.com/images/Products/spicebox_FPage.jpg" width="250" height="286" />when all you really need here is```
<img src="images/Products/spicebox_FPage.jpg" />


Add to your stylesheet```
#indexCategoriesMainContent img {
    float: left;
    margin: 0 4px 8px 0;
    }
```This will make images in your define_main_page content move to the left, wrap text, and leave a 4px space to the right and 8px space to the bottom, with top and left having no extra spacing (the <p> already takes care of that).

border="0" will obviously not get you any border; to have any of the standard types of HTML border, add to your stylesheet rule```
    border: 2px solid #aabbcc;
```using whatever values you want for width, style and color.
10 Nov 2009, 5:58 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,890
Plugin Contributions:
20

Re: Wrapping text around image, and borders not working in IE

Glenn's spot on. Be sure you add the css at the end of stylesheet_tm.css.

AND, you need to either resize the image or get image handler involved. 500k+ is a killer.

We each do things differently but the same somehow. When adding a lot of things in a page edited by define pages editor, I always use the html and add IDs/Classess to things even if I don't use them in a stylesheet. I would have added a class for the <p> and <li>. Also, I would have added an id to <img> and <UL>. Then you have complete control through the stylesheet.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Nov 2009, 6:18 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Wrapping text around image, and borders not working in IE

Yes, I would have added a class/id to the <img> and other elements myself, but didn't see the need to introduce that bit of complexity to this simple problem.

10 Nov 2009, 6:47 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,890
Plugin Contributions:
20

Re: Wrapping text around image, and borders not working in IE

Guess it's the teacher in me.:smartalec:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

10 Nov 2009, 10:33 PM
#10
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

Thanks. You guys are great! I took your advice and reduced the image file size to the dimensions I wanted on the page, remove the code for size, and added the basic stylesheet entries you suggested. Text wrapping and border works just find now. I was even able to figure out how to change the link attributes so they no longer show up as hard to read light-grey.

I also want to change the default color for bulleted lists, but I have not been able to identify the code in the stylesheet. Can you clue me in? Thanks.

11 Nov 2009, 12:13 AM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,890
Plugin Contributions:
20

Re: Wrapping text around image, and borders not working in IE

Glad you got it working.:clap:

You could change the <ul> code to something like <ul id="mainUL"> and add a #main ul {color: #000000} to the stylesheet at the end. You can then change the #000000 to whatever color you like.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Nov 2009, 5:59 AM
#13
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

You lost me...I'm pretty good with wood, lousy with web development. I added #mainUL {color: #000000;} to the bottom of the stylesheet. Where do I change the **<ul> code to <ul id="mainUL"> **

I have another question on text wrapping around images. Is it possible to force the Category text to start at the top of the Category Image, then wrap around like we did on the main page? Let me know if I should open another thread for this.

Thank you.

11 Nov 2009, 6:34 AM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Wrapping text around image, and borders not working in IE

Dbltoe is referring to the <ul> you have in define_main_page.php, in the Define Page Editor.

For the other category image, add to your stylesheet_tm.css```
#categoryImgListing {
width: 74px;
float: left;
margin: 2px 8px 8px 0;
}

11 Nov 2009, 6:39 AM
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,890
Plugin Contributions:
20

Re: Wrapping text around image, and borders not working in IE

gjh42:

Err, teacher... #mainUL {color: #000000;}

:smartalec:
:shocking:Can I claim Secondary Post Traumatic Syndrome on that one?

Tim,
What you've done will work. We just don't normally hard code colors.

You can start a new thread, but be ready for the negative TM feedback. Most folks here don't appreciate having to clean up their messes. They have put things in different divs and you would need to modify the correct tpl page under templates. Who knows which they might have used. They may have done something like I did above:wacko:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

11 Nov 2009, 7:49 AM
#16
timmyneal avatar

timmyneal

New Zenner

Join Date:
Sep 2009
Location:
Kill Devil Hills, NC
Posts:
20
Plugin Contributions:
0

Re: Wrapping text around image, and borders not working in IE

OK. That worked great also. I think I'm done for now. Thanks for all your help.

Tim