This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Agilyolchuyev
over 8 years

CSS Overview 23,25,26

Hi guys. Could someone explain what’s wrong at this codes

In 23: p { font-size:18px; color:#4A4943; } h1 { font-family:Verdana; color:#576D94; }

In 25:

h1 { font-family: Verdana,sans-serif; color: #576D94; }

p { font-size:18px; color:#4A4943; font-Family: Garamond,serif; } img { border:1px solid #4682b4; height:100px; width:300px;

}

In 26:

h1 { font-family: Verdana,sans-serif; color: #576D94; }

p { font-size:18px; color:#4A4943; font-Family: Garamond,serif; } img { border:1px solid #4682b4; height:100px; width:300px;

}

link { text-decoration: none; color:#cc0000;

}

Answer 560e4728b625485b59000206

0 votes

Permalink

in exercise 26 you use link as css selector. With link you try to target <a></a> in html, i would use a different css selector. You have problems in all this exercise? Can i see your html? you css is fine.

check here how to format your html code, if you update your question leave a comment so i get a notification.

points
Submitted by stetim94
over 8 years

Answer 560e58f0e39efe364c00025b

0 votes

Permalink

Yes sure. 23 code format in HTML:

<!DOCTYPE html>
<html>
    <head>
        <title>Result</title>
    <link type="text/css";rel="stylesheet";"href="stylesheet.css"/>
    <h1>jhjh</h1>
    </head>
    <body>
    
    <p>linkedin.com</p>
    </body>
</html>

For 25:

<!DOCTYPE html>
<html>
    <head>
        <title>Result</title>
    <link type="text/css";rel="stylesheet";"href="stylesheet.css"/>
    </head>
    <body>
    <h1>salam qaqa</h1>
    <p>manis</p>
    <img src = "http://weknowyourdreams.com/images/beautiful/beautiful-09.jpg"> </img>
    </body>
</html>

For 26:

<!DOCTYPE html>
<html>
    <head>
        <title>Result</title>
    <link type="text/css";rel="stylesheet";"href="stylesheet.css"/>
    </head>
    <body>
    <h1>test test</h1>
    <p>test</p>
    <img src = "http://weknowyourdreams.com/images/beautiful/beautiful-09.jpg"> </img>
<a href="http://weknowyourdreams.com/images/beautiful/beautiful-09.jpg">vfgfgd</a>

    </body>
</html>

Thanks in advance

points
Submitted by Agilyolchuyev
over 8 years

1 comments

Agilyolchuyev over 8 years

Problem is that all my errors related to CSS.

Answer 560e5b8e9113cbef77000239

0 votes

Permalink

yea, but the reason all the errors relate to css is because your link to stylesheet is faulty. Look at your link:

<link type="text/css";rel="stylesheet";"href="stylesheet.css"/>

Two problems: attributes (type, rel, href) are separated by spaces, not semi-colons. So then it becomes:

<link type="text/css" rel="stylesheet" "href="stylesheet.css"/>

now, you have "href, the " shouldn’t be before the href, so it becomes:

<link type="text/css" rel="stylesheet" href="stylesheet.css"/>

and you still have to think of the correct css selector for link (<a></a>) in exercise 26, but i am sure you can think of that.

One more thing i want to say, semi-colons are used to separate property’s and value pairs when using style attribute:

<p style="color: red;font-size: 16px;font-family: Arial">

and spaces are used to separate attributes:

<img src="#" alt="my image">
points
Submitted by stetim94
over 8 years

5 comments

Agilyolchuyev over 8 years

OOOO yes yes thanks a lot )))))) I didn’t even look to link part ))))).Again thanks

Agilyolchuyev over 8 years

Again again thanks

stetim94 over 8 years

you’re most welcome, sounds like you made everything work

Agilyolchuyev over 8 years

yes in last one I confuse the word of link with tag )))))) So I changed around 10 times CSS think that problem in that (but the name of tag always was link ))))). I changed the name of tag in CSS to “a” so it worked . Thanks again

stetim94 over 8 years

very good, you’re welcome