My project code not working

So I’m not sure if this is the right place to ask for help outside the courses, but I hope I can get help I still go through FFC courses but I’m building my own project on the side to strengthen my past skills and not forget what I learnt so this is the problem. :face_holding_back_tears:

I’m just trying to do a apply a very simple CSS style to my HTML so I can put the title of my page at the centre this is my code (I’m using VSC btw)

HTML CODE

<h1 >Welcome to habit tree </h1>
    <h2>manage your life here;)</h2>
    <nav>
        <label class="title">x's Habit tree</label>
    
    <ul>

That was my html but to be honest only the h1 element is relevant
CSS code

h1 {
    text-align: center;
    color: #43bb79
}

That’s all pretty simple I always go to chatgpt and ask but it even said that there’s not a problem with my code and maybe something like I need to try a diffirent web browser or its a typo or other trouble shooting things. Can anyone help? All I want it do is center my title (which is the h1 element) but its not working

for me it centers
can you show your code somewhere like codepen or your page online

If the code above is for a personal project then you can ignore this, but if the code above is for a certification project then I have to point this out
Using AI in certification projects

no its a personal project dw :eyes:

1 Like

My apologies, the description says its your own project. Sometimes I cant read when I get up in the morning :sweat_smile:

1 Like

Hey so I signed into code pen and it centered and also applied the colour but it wont on my visual studio code live server i have no idea why but is there anything I can do to fix it?

Also I did some troubleshooting I pasted the link of my live web server to a diffirent browser and I tried applying a random style to my css to see if it was a problem with something i coded but nothing i code into my css on vsc is being applied to the live web browser but my code does work?

if code works on codepen, it will work on webpage.
last case scenario, click on EXPORT button on codepen, which downloads your code on pc, and upload that on your webpage. it will work normal.

I use windows laptop how do i do that?

just click on export, while you’re signed in in codepen.
it will offer you download of a webpage, in zip archive.

then you can extract, and it will be as it was in codepen.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.