cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble with HTML and CSS in listings

I designed a layout in Dreamweaver CS6. It looks fine there and when previewed in Chrome. I copy the code to notepad to eliminate unwanted codes and then copy into my listing on the HTML tab (I do NOT go back to the standard tab). I submit the listing and view it. It is as if it is ignoring my most of my CSS code. I have attached what it looks like in Dreamweaver and then on eBay. Below is my code (sorry, couldn't attach a .txt file). Any help or advice would be greatly appreciated. I figure I'm doing something stupid...

 

<!doctype html>
<html>
<meta charset="utf-8">
<title>North American P-51 Mustang - Plane Poster Print - Military Warbird Photo</title>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="North,American,P-51,Mustang,Plane,Poster,Print,Military,Warbird,Photo">

<style type="text/css">
body {
background-color: #F0F0F0;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
#listing {
min-width: 500px;
max-width: 1100px;
width: 100%;
height: 100%;
margin-right: auto;
margin-left: auto;
border-color: #03F;
border-top-width: 4px;
border-right-width: 4px;
border-bottom-width: 4px;
border-left-width: 4px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
background-color: #FFF;
}
#header {
width: auto;
height: auto;
margin-right: auto;
margin-left: auto;
margin-top: 10px;
margin-bottom: 10px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
#description {
width: auto;
height: auto;
margin-right: 10px;
margin-left: 10px;
margin-top: 10px;
margin-bottom: 30px;
border-color:#03F;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
#desctext {
overflow:hidden;
}
#payment {
height: auto;
width: auto;
min-height: 130px;
margin-right: 10px;
margin-left: 10px;
margin-top: 0px;
margin-bottom: 20px;
border-color: #8D8D8D;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
#shipping {
height: autopx;
width: auto;
min-height: 153px;
margin-right: 10px;
margin-left: 10px;
margin-top: 0px;
margin-bottom: 20px;
border-color: #8D8D8D;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
#returns {
height: auto;
width: auto;
min-height: 140px;
margin-right: 10px;
margin-left: 10px;
margin-top: 0px;
margin-bottom: 20px;
border-color: #8D8D8D;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
#feedback {
height: auto;
width: auto;
min-height: 160px;
margin-right: 10px;
margin-left: 10px;
margin-top: 0px;
margin-bottom: 20px;
border-color: #8D8D8D;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
#footer {
height: auto;
width: auto;
margin-right: 10px;
margin-left: 10px;
margin-top: 10px;
margin-bottom: 10px;
border-color: #8D8D8D;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
padding-left: 10px;
padding-right: 10px;
}
img.displayed {
display: block;
margin-left: auto;
margin-right: auto;
}
.left {
float: left;
padding-top: 4px;
padding-right: 15px;
}
.right {
float: right;
padding-top: 4px;
padding-left: 10px;
}
p {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
display:inline;
}
h1 {
font-family:Arial, Helvetica, sans-serif;
font-size:26px;
font-weight:bold;
color:#03F;
text-align:center;
}
h2 {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
font-weight:bold;
color:#000000;
display:inline;
}
h3 {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
font-weight:bold;
color:#000000;
text-align:center;
}
h4 {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
font-weight:bold;
color:#000000;
display:inline;
}
h5 {
font-family:Arial, Helvetica, sans-serif;
font-size:20px;
font-weight: bold;
color: #000000;
display:inline;
margin-left: 40px;
margin-top: 20px;
}
</style>
</head>

<body>

<!-- HEADER SECTION -->
<div id="header"><img class="displayed" src="http://www.infinityproductionsllc.com/ebay/store/images/inspirational_images_listing_header2.jpg" alt="Inspirational Images Header Image"></div>
<!-- http://www.infinityproductionsllc.com/ebay/store/images/inspirational_images_listing_header.jpg -->


<div id="listing">
<!-- DESCRIPTION SECTION -->
<div id="description">
<h1>North American P-51 Mustang - Plane Poster Print - Military Warbird Photo - Wall Art</h1>
<div id="links">
<div><a href="http://stores.ebay.com/inspirationalimages"><img src="http://www.infinityproductionsllc.com/ebay/store/images/store_icon2.png" class="right" alt="eBay Store Link"></a></div>
<div id="desctext"><h2>Inspirational Images</h2>
<p> offers professional, archive quality prints for your home, office or anywhere you want to display art that inspires.<br><br>This print is available in <strong>8"x10" and 13"x19"</strong>.We offer </p><h2>30 day Returns and FREE standard shipping</h2><p> to any of the 50 states in the U.S. Your print(s) will ship in a strong shipping tube to ensure safe arrival to your location. Please read the sections below for details on payment, shipping, returns and eBay feedback.</p><br><br>
</div>
</div>
</div>


<!-- PAYMENT TITLE -->
<div id="payment-title">
<h5>PAYMENTS<h5>
</div>
<!-- PAYMENT SECTION -->
<div id="payment">
<p><img src="http://www.infinityproductionsllc.com/ebay/store/images/paypalverified.png" alt="PayPal Logo" class="right"><br><h4>We only accept PayPal for payment. A PayPal account is NOT required.</h4><br><br><p>You can use any major credit card listed above through PayPal without an account. Payments are required within three (3) days of purchase or the transaction will be cancelled. If you have not contacted us, an Unpaid Item complaint will be filed with eBay.</p><br><br>
</div>


<!-- SHIPPING TITLE -->
<div id="payment-title">
<h5>SHIPPING<h5>
</div>
<!-- SHIPPING SECTION -->
<div id="shipping">
<p><img src="http://www.infinityproductionsllc.com/ebay/store/images/free_shipping_usps.jpg" alt="Free Shipping Logo" class="left"><br><h4>Shipping is FREE to all 50 states in the U.S.</h4><br><br><p>Your print(s) will be carefully packed into a sturdy shipping tube and sent via USPS 1st Class mail. We ship within 24 hours of receiving payment. Orders placed on Saturday or Sunday will ship the next business day. We will send an eBay message containing your tracking number once we have printed your shipping label.</p><br><br>
</div>


<!-- RETURNS TITLE -->
<div id="payment-title">
<h5>RETURNS<h5>
</div>
<!-- RETURNS SECTION -->
<div id="returns">
<img src="http://www.infinityproductionsllc.com/ebay/store/images/returnslogo.png" alt="Returns Logo" class="left"><br><h2>Returns are gladly accepted up to 30 days from purchase.</h2><p><br><br>
<p>If a print is defective, we supply return shipping and you can get another print at our cost or a full refund. If not defective, the print must be returned (at the buyer's expense) and be in resellable condition in the original shipping tube.</p><br><br>
</div>


<!-- FEEDBACK TITLE -->
<div id="payment-title">
<h5>FEEDBACK<h5>
</div>
<!-- FEEDBACK SECTION -->
<div id="feedback">
<img src="http://www.infinityproductionsllc.com/ebay/store/images/feedbackLogo.jpg" alt="Feedback Logo" class="left"><br><h4>We want to earn your positive feedback! If, for any reason, you are unsatisfied with your purchase, please contact us first and we will do our best to make it right.</h4><br><br><p>Our goal is to provide a perfect transaction every time. We value giving and receiving feedback very highly. We will always leave feedback upon receiving your payment. Please consider doing the same for us once your print arrives and you're happy with your purchase.</p><br><br></td>
</div>


<!-- FOOTER SECTION -->
<div id="footer"></div>
</div>

</body>
</html>
</div>

Message 1 of 8
latest reply
1 BEST ANSWER

Accepted Solutions

Trouble with HTML and CSS in listings

@ataribravo

 

Most of the differences between "quirks" mode and "standards" mode seem to affect how padding, margins, and borders are applied — essentially a spacing issue around elements.  As I recall, you may also have a centering issue on one of your elements, but until you fix your tags, we don't really know.  You won't be able to perfectly design to all browser quirks. Just aim at getting something that displays close to what you want, with and without the doctype.  When eBay starts adding a doctype to the description, you can design to "standards" mode only.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.

View Best Answer in original post

Message 8 of 8
latest reply
7 REPLIES 7

Trouble with HTML and CSS in listings

The description in an eBay listing is just a part of the eBay listing and it is not a standalone web page. The code you created is for a standalone web page and things like the body statement are only allowed in the eBay listing page. Enough of your dreamweaver code is dropped or ignored in the description that the code is broken.

 

@shipscript     Please help this eBay member when you can.

 

PS When you want to show code in an eBay forum post, use the toolbar symbol </> Insert Code (7th symbol from the left) to create an isolated box in your post to show your code. Some of your code posted in the main body of your post most likely was altered or dropped when you posted. Here is a sample of your code copied to the Insert Code box.

 

 

<!doctype html>
<html>
<meta charset="utf-8">
<title>North American P-51 Mustang - Plane Poster Print - Military Warbird Photo</title>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="North,American,P-51,Mustang,Plane,Poster,Print,Military,Warbird,Photo">

<style type="text/css">
body {
background-color: #F0F0F0;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
Message 2 of 8
latest reply

Trouble with HTML and CSS in listings

Thank you for that information (both for ebay and forum posting). Can you tell my how to modify my code to get the desired result? I know external stylesheets are not allowed, so how do I style my description? Thanks again!
Message 3 of 8
latest reply

Trouble with HTML and CSS in listings

In the latest seller update, ebay is discouraging including shipping and payment information in the description area (not saying you can't do it though)

Display your returns policy in the structured data fields
For the best buying experience, we recommend that you only include information about the product in the item description. Details about payment, shipping, or returns should be included in the structured data fields available for Business Policies. This will ensure that the information will be presented clearly and contextually to buyers on desktop and mobile devices.

 

http://pages.ebay.com/seller-center/seller-updates/2017summer/listing-policy-updates.html

Message 4 of 8
latest reply

Trouble with HTML and CSS in listings

I appreciate the comments on how to post here and what to not include in my listing description. Can anyone help me with the purpose of the post? If I want to include CSS in my description, how do I implement that without ebay modifying it? Or better yet, what do I not include from a standalone html page to best fit in the description field? Thanks.
Message 5 of 8
latest reply

Trouble with HTML and CSS in listings

@ataribravo

 

It appears to me that your stylesheet is being honored. I do see the borders and background colors from your stylesheet applied to the listing example.

You have a doctype declared at the top of your description (which will be ignored because it is not the first line on eBay's page); yet eBay declares none either (they have announced that they will apply doctype in the future). That difference between your controlled doctype environment and eBay's quirks-mode environment could change the way your page renders on different browsers.

 

Additionally, there are lots of unclosed tags in your code, which could further confuse a browser. Look for missing closing </p> tags and for <h4> that are missing/misstating the </h4> closer. I also see a <td> in there.

 

Even after all the open tags are corrected, there is a conflict with mobile. The mobile viewport tag is included in the meta tag, but one of your styles sets the minimum width to 500px, when the smallest viewport is 320px, so the page won't downsize adequately. Additionally, there are some images that will not shrink down to 320px.  So if you set the viewport meta tag, which tells the phone device not to shrink the page for pinch and zoom, you are essentially forcing scrollbars on visitors.

 

To make your header image flexible for mobile, add this line to the style that manages your head image:

      img.displayed{

      max-width:100%;

 

Then to your listing wrapper, which appears to be "#listing", add this rule

      img { max-width:100%; }

 

There are other issues that arise when you try to style the body tag or other generic tags without constraining then with a class in your stylesheet because your page and eBay's page are going to arm-wrestle for control of those elements.  When you use classes, you can tightly control your own content. 

 

For instance, there are lines like this where P is a generic tag

      p {
      font-family:Arial,...

 

To make it your own tag, you might preface it with the classname or id of your container that holds that P tag, like this

 

      #listing p {
      font-family:Arial,...

 

That style rule will apply to all P tags contained by this element

      <div id="listing">

 

Essentially, if there is not a dot (.) or hash (#) in the style rule that prefaces the curly braces {}, you are probably going to have conflicts.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 6 of 8
latest reply

Trouble with HTML and CSS in listings

Wow! Thank you for your time in sending that response! I will try to clean things up and see if I can get closer. Could you point me to where I can get more info on "doctype environment and eBay's quirks-mode"? I did notice that without the doctype declaration in Dreamweaver, some CSS did not function correctly. Thanks again!
Message 7 of 8
latest reply

Trouble with HTML and CSS in listings

@ataribravo

 

Most of the differences between "quirks" mode and "standards" mode seem to affect how padding, margins, and borders are applied — essentially a spacing issue around elements.  As I recall, you may also have a centering issue on one of your elements, but until you fix your tags, we don't really know.  You won't be able to perfectly design to all browser quirks. Just aim at getting something that displays close to what you want, with and without the doctype.  When eBay starts adding a doctype to the description, you can design to "standards" mode only.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 8 of 8
latest reply