Unidentified symbol in a stylesheet is most mysterious.

  • Skylord
  • Newbie
  • Newbie
  • Skylord
  • Posts: 9

Post 3+ Months Ago

I've been given a chance to work on an up and running website for the first time. Before I was given access to the account, on the site that hosted the website, I had copied the html code and stylesheet and made a makeshift copy using xitami. The one problem I had with editing the stylesheet was a pesky little symbol that presented itself like so: /*~*/ at the end of certain declarations. The visual design of the page would not change unless I deleted it. My main concern about all of this is will deleting this while editing the true stylesheet cause problems? Is that symbol some kind of functional code? will it prevent any of my changes to the stylesheet being used? I couldn't find anything about it. I appreciate any help you can give.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

The tilde in CSS is an indirect adjacent combinator.

http://eriwen.com/css/css-indirect-adjacent-combinator/
  • Skylord
  • Newbie
  • Newbie
  • Skylord
  • Posts: 9

Post 3+ Months Ago

I appreciate the help and on top of that I learned something new so thank you!

The way it is presented in the stylesheet itself is:

(this is just an example)
CSS Code: [ Select ]
#content
{
background-color:#ffffff; /*~*/
}
  1. #content
  2. {
  3. background-color:#ffffff; /*~*/
  4. }


Will that do the same thing as shown in the link you posted?
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Actually the answer is no, it will not do the same thing as what is shown in the link. You can remove that part with no problem. It is actually a comment as anything that falls between:

/* and */

are simply comments and do not actually do anything. For example what you wrote above could also be:

CSS Code: [ Select ]
#content {
   background-color:#ffffff; /* This is my comment here */
}
  1. #content {
  2.    background-color:#ffffff; /* This is my comment here */
  3. }


and the results would be example the same. If you do delete it, make sure you delete the starting /* and the ending */ as if you only delete one of them then its possible that it could mark much of your code as a comment instead of actually code then which would break your entire stylesheet.
  • Skylord
  • Newbie
  • Newbie
  • Skylord
  • Posts: 9

Post 3+ Months Ago

Alright I'll remember that. I got everything sorted out. Thanks for the teachins though!

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 55 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.