I need css help

I need css help
0

#1

can anyone tell me what im doing wrong?


#2

you have non-css code in your style tag, namely CatPhotoApp


#3

I TOOK THAT OUT BUT IT STILL ISN’T GIVING MY DESIRED RESULT.


#4

What is your desired result?

you wrote a style tag that will make the <h2> element text blue, but the excerpt you showed has no H2 element.


#5

I’m guessing you want to make CatPhotoApp into a heading and also make it blue.

As @psychometry point out, with the code in your second post, the code in your <style> tag is making all <h2> elements blue, which should work for what I think you want to accomplish.

You simply need to put the text CatPhotoApp between your </style> tag and your <p> tag.

Then wrap CatPhotoApp in <h2> tags.


The other option, which I think may have been confusing you in your original code, is to use inline CSS. Check out the example under “Inline CSS” here:

https://www.w3schools.com/html/html_css.asp

Hope that helps!


#6

Thank you so much! It makes sense now :slight_smile:


#7

How do I make a call to google, and import the lobster font?


#8

I think they just used a URL. You could also make an ajax request.


#9

The language can be a little confusing at first, because technically, you don’t have call anybody and you don’t have to import anything. You just need to leave instructions so that when a browser accesses your list of html text instructions, that browser understands that IT, the Browser, needs to make a call to google fonts and import Lobster.

So the html text you are writing (and the css inside it ) is a list of instructions for a future web browser to read and understand. A browser like google chrome or Safari or Internet Explorer. Whenever someone tells their web browser to go to your site, their browser will call your site, and your site will send the list of instructions in a fraction of a second, and then their browser will get your list and proceed to “build” your site for the viewer.

And if you want the user to see a font that looks a particular way, like in the style called “Lobster,” that browser needs to “Call Google for the Lobster Font.” Because the user’s computer doesn’t have Lobster on it, and you aren’t sending it; you’re just sending instructions for where to find it. A URL. Like www.fonts.google.com/lobster, which is probably not the right url, but I believe the exercise shows you the correct one to include. You probably need to include it within a <link> tag so the browser definitely understands what to do with it (which is: “call this url and import the lobster font”).

The browser will handle that as long as you list that in your instructions.


#10

I think it’s P element, not h2 element.

Try this:
p {
color: blue;
}


#11

I think this would help with the Lobster font issue, you have to add this (like in the beginning of your code):
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">


#12

Akosuadnell, please can you put me through how you passed through this stage …I seem not to be getting it


#13

which stage are you referring to?


#14

Use CSS Selectors to Style Elements stage …sorry I am new , and I am not understanding what else to do again …please help me…thank u


#15

sorry im only a few days in myself. i would suggest creating a new thread and posting a screen shot of what you need help on. thats what helped me. then more experienced people can reply


#16

What exactly are you having trouble with Ohams? I’m no expert, but I’d be happy to help if I can :slight_smile: