Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

need help understanding a line of code

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-01-2014, 10:20 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default need help understanding a line of code

I was validating my code with w3c validator and it pops up this line.
Code:
<div class="details" style="margin-left: 1px <-- 300px -- >;">
I'm not sure what it means, I have not seen the extra
Quote:
<-- 300px -- >
before, what does it do?
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 05-01-2014, 10:40 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: need help understanding a line of code

<-- 300px -- > is probably doing nothing. It is commented out using html comments, and done improperly at that.

It should be <!-- 300px -- >

Sorry for the w3fools link:
http://www.w3schools.com/tags/tag_comment.asp

I would just remove the offending little bugger.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following 2 users thank totaltec for this useful post:
qualiteam (05-05-2014), tartaglia (05-02-2014)
  #3  
Old 05-01-2014, 10:42 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: need help understanding a line of code

I wondered if that was the case. I didn't want to delete it without checking first.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #4  
Old 05-05-2014, 09:36 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: need help understanding a line of code

Quote:
Originally Posted by totaltec
It is commented out using html comments, and done improperly at that.

It should be <!-- 300px -- >

It is inside the style attribute, so I believe the correct way to comment this is /* 300px */.

Quote:
I would just remove the offending little bugger.

I would do the same, unless there is a chance you will revert the change (from 300px to 1px margin) back
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote

The following 2 users thank qualiteam for this useful post:
keystone (05-06-2014), totaltec (05-06-2014)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:01 PM.

   

 
X-Cart forums © 2001-2020