News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Editing of code at .poster

Started by Snickerz, September 13, 2014, 06:25:18 PM

Previous topic - Next topic

Snickerz

Alright. I think this is in the right spot, if it's not, please feel free to move it, and let me know so that I know where to post questions like this in the first place.

Ok, with that out of the way, here's my situation. I am working on editing the colors on the code, to the left hand side of every post made on SMF is a member's profile information. It is edited in the .poster section (sure I'm not really telling most of you something you don't already know, but just in case). So, I right click in the section and choose "inspect elements" for me this is a great way to edit the colors, textures, font styles, designs and other things on my site without risking completely ruining it.

In the section .poster, I edited in a border to go to the right hand side and the bottom of the profile information. To help better separate it from the post. As I am running an rp site, and there are people who play multiple characters, I feel this is will help make things less confusing. When I got a style I liked I went to the same section in the index.css. I edited it in, then refreshed my page. However, the edits weren't there. When I then opened up my inspect element again what I added had one of those triangle yield signs next to it. When I highlight over the sign it says "Invalid Property Value".

Two questions, one is, what in the world does that even mean? Second is, does this mean I can't edit this area because I would really like to. If I haven't given enough information to help you understand my situation feel free to let me know. I could also post pictures and codes up of what I'm doing and where.

Thank you in advance for any help you can provide me with.

Arantor

Invalid property value means you put something in that is invalid CSS. Since you didn't outline what it was you actually changed, it's impossible for us to tell you what's wrong with it...

Snickerz

In the coding the set up under .poster is


.poster
{
   float: left;
   width: 15em;


But I wanted to add an outline to divide seperate it from the actual post so I added the bottom lines


.poster
{
   float: left;
   width: 15em;
   border-right: 2px dotted darkred
   border-bottom: 2px dotted darkred


When I went back to my inspect elements, it had both lines combined and crossed out saying that they were an invalid entry. Which is what makes me think I did something wrong because they weren't supposed to be the same line in the first place, they're supposed to look like the code above, and when I type them into index.css the above is exactly how I put them in.

Maybe I'm over thinking it. I've always been told coding is hard (think that was by lazy coders though to be perfectly honest).

Arantor

It's invalid because there's a missing ; at the end.

It should read:
.poster
{
   float: left;
   width: 15em;
   border-right: 2px dotted darkred;
   border-bottom: 2px dotted darkred;


Coding is hard. But it's not impossible. It's just very literal, and that's why it's hard for most people to get their heads around.

Rule 1: computers are idiots. They have no intuition, no ability to guess what you might have meant. They are cold, cruel, logical things. They take what you tell them and will follow it if possible. Even if it's illogical or stupid. Because they don't know any different.

In this case, it interpreted your two rules as one lone rule - which it doesn't know how to deal with and therefore said it was invalid. Put the ; in and I'm sure it'll be more happy about it.

Snickerz

Oooh, alright. Yeah I can see that. the ; allows the computer to read the code as two separate entries, as one it is invalid because it reads that my second line is all part of my first order which is for the right border. That actually makes sense. I will certainly have to keep that in mind. Thank you. :)

I have noticed that the slightest thing you miss will set the world into chaos when it comes to computers. Little details are what seem to really get to me the most I think, things like that. Thank you Arantor. :) You're a wonderful help.

Arantor

Yup, computers are incredibly literal and you'd be surprised how much a single character can mess things up. Typos are the worst, too.

Lemme know if you have any other problems :)

Advertisement: