TinyChan

Topic: Can someone tell me what went wrong?

+FuckAlms !vX8K53rFBI12.6 years ago #31,929

Original.pngAll the operations should be lossless but for some reason the red h1 doesn't bold properly in my edit.

Original code: http://pastebin.com/VfKjkxZG
<- image

·FuckAlms !vX8K53rFBI (OP) — 12.6 years ago, 1 minute later[T] [B] #367,713

Edit.pngMy code: http://pastebin.com/ngA3LCHy
<- image

+Anonymous B12.6 years ago, 8 minutes later, 9 minutes after the original post[T] [B] #367,721

@OP

<html lang="en-US"><head><title>Mozilla Firefox, Portable Edition Help</title>


VS

<html lang="en-US"><head>
<title>Mozilla Firefox, Portable Edition Help</title>



You forgot to press enter after <head>

+Anonymous C12.6 years ago, 6 minutes later, 15 minutes after the original post[T] [B] #367,726

@OP
Get laid poindexter.

Also, because some mentally ill nerd, or software written by a mentally ill nerd, has tried to optimize the CSS rules without realizing that order is important for rules of equal importance.

Original:
a
{
color: #B31616;
font-weight: bold;
}
a:link {
}
a:visited {
}
a:active {
}
h1, h2, h3, h4, h5, h6 {
font-family: Arial, sans-serif;
font-weight: normal;
}
h1 {
color: #B31616;
font-weight: bold;
letter-spacing: -2px;
font-size: 2.2em;
border-bottom: 1px solid silver;
padding-bottom: 5px;
}

Both rules are equally important since they're both tag rules, but the font-weight: bold; takes precedence because it comes after the rule for h1, h2, h3, h4, h5, h6.

a,h1,strong,b{font-weight:700}
a:link,a:visited,a:active{}
a:hover{color:red}
h1,h2,h3,h4,h5,h6{font-family:Arial,sans-serif;font-weight:400}
Here, the a, h1 etc rules are merged, and are placed before "normal" rule, so now the normal rule takes precedence. (400 and 700 are just explicit values for normal and bold.)

+Anonymous D12.6 years ago, 9 minutes later, 24 minutes after the original post[T] [B] #367,737

Yes. You failed to fucking donate.

·FuckAlms !vX8K53rFBI (OP) — 12.6 years ago, 10 minutes later, 34 minutes after the original post[T] [B] #367,741

@367,726 (C)
That mentally ill nerd is me, and I was vaguely aware that order has some bearing, which is why I always move a combined rule so it is right above the first instance of any related rules. So what you're saying is if two rules define different states for the same value, the last one will always override?

·Anonymous C12.6 years ago, 15 minutes later, 50 minutes after the original post[T] [B] #367,756

@previous (FuckAlms !vX8K53rFBI)
Yeah, assuming they have the same importance. For example, a class rule (.myclass{}) will always take a precedence over a tag rule. Here's the precedence from highest to lowest: style="" #id .class tag. And of course, any rule with !important always takes precedence over rules without it, and !important rules follow the same precedence chain internally. That's easy. Now to try get float to do what you want...

·FuckAlms !vX8K53rFBI (OP) — 12.6 years ago, 3 minutes later, 53 minutes after the original post[T] [B] #367,759

@previous (C)
Ugh float is a clusterfuck. I had to try and make a simple webpage using floated divs for my intro to web programming class. I never managed to get the floats right.

·FuckAlms !vX8K53rFBI (OP) — 12.6 years ago, 1 day later, 1 day after the original post[T] [B] #368,291

@367,726 (C)
On a related note, if something is marked !important, is a single whitespace necessary to separate the property from the important tag?
like would
{background:#000!important}

function the same as
{background:#000 !important}

?

·Anonymous C12.6 years ago, 9 hours later, 1 day after the original post[T] [B] #368,394

1298674879529897.jpg@previous (FuckAlms !vX8K53rFBI)
The whitespace is necessary. Why would you even think otherwise, race traitor.

+The Doctor !7MHPahvoGY12.6 years ago, 30 seconds later, 1 day after the original post[T] [B] #368,395

ChristopherEccleston.jpg@367,759 (FuckAlms !vX8K53rFBI)

Upgrade to webs.com.

+Anonymous F12.6 years ago, 12 minutes later, 1 day after the original post[T] [B] #368,396

> Can someone tell me what went wrong?
Me being born.

+Anonymous G12.6 years ago, 8 minutes later, 1 day after the original post[T] [B] #368,397

@368,291 (FuckAlms !vX8K53rFBI)
Whatever you're doing, stop it. Use this:

http://yui.github.io/yuicompressor/

Thank me later.

·FuckAlms !vX8K53rFBI (OP) — 12.6 years ago, 2 hours later, 1 day after the original post[T] [B] #368,412

@previous (G)
The methods page is quite useful, thanks.

Start a new topic to continue this conversation.
Or browse the latest topics.

:

You are required to fill in a captcha for your first 5 posts. Sorry, but this is required to stop people from posting while drunk. Please be responsible and don't drink and post!
If you receive this often, consider not clearing your cookies.



Please familiarise yourself with the rules and markup syntax before posting.