Need help to understand why i can't style an element

Need help to understand why i can't style an element
0

#1

I have an element that I can click on and it takes me to another section of my page

I can’t style this link anything wrong? https://gyazo.com/a256b35d1d14a385ff19947f977641bc

But I can’t seem to style it to go anywhere. I want to get it to tips more info and about me. Is it that something else is taking over the code or something. I have come into this kind of problem a few times before so I would also like to know what stop something from being able to be styled.


#2

I don’t understand which page you are trying to link to. Pens only have one html file. index2.html would be another html file. Projects have multiple html files.


#3

i try to link to another page in the same page so i can click on about me and then i can write a text in another side of the page. I have the html2 in the same foler as html


#4

I want to style it so the about me on the top of the page goes to where the another about me is right now but when i try to style it nothing happens. I also want to remove the underline and the weird blue color. So i want to know why i cant style it. I must have missed something somewhere or there is something i don’t know about that hinder me from styling the href class


#5

Here’s how I would link to a section of my page:

<a href="#below">Below</a>
//blah blah blah
<div id="below"></div>

#6

For the blue color and underline, manually remove the underline and set the color. You need to target the <a> tag directly, it won’t inherit these properties from a parent element. Try something like this:

a.link {
     text-decoration: none;
     color: black;
}

#7

Ye i know the problem is no command that i use to style the link works there is something that maybe overrides it or something wrong. I don’t really understand it.


#8

I’ll fork your pen and edit it.
Here’s the link: https://codepen.io/b3u/pen/LBOgNJ


#9

Oh! @Sebbe are you trying to link the <a> tag, or move the element to somewhere else on the page?


#10

Ok so the end goal is to have 3 elemnts on the right side and when someone want to click on them there will open a new window like in google you see in the right corner your gmail and photos and when you click on it something happends it takes you to the gmail and photos. I want it so when people/me click on more info it will take me to another page but same website and there i will write text about me. This is for practise and i have been stuck here forever…


#11

Okay. Btw Did my edits work? they’re all the way at the bottom of the css section.


#12

Not in my project file there must be something hidden somewhere i cant find it ill try to make 2 new files and place the html css there and see if it works in a new sublime text


#13


Copy the files/code in this project. It should work. Make sure everything’s spelled correctly. Not sure what you’re doing wrong either. But that’s coding, right? :wink:


#14

yep i made it work on a new file guess there is something wrong in my original file ill look at both and see line by line if i can find something wrong i’ll get back to you if i find it thanks for the help.


#15

My pleasure. I love, this forum, it’s so helpful.