0

I recently created an account in github and I started coding with a simple exercise on aligning images using HTML and CSS code.

So I wrote the HTML code to align 4 images in a row and now I am stuck on styling part.

I'm unable to style it in <style> element of HTML. I.e. the changes are done within head using <style> tags are not having any effect, in simple there are no changes after I commit it.

I want to add CSS to the existing file. What are the ways to add? How to link CSS code?

12
  • Is your question about HTML stuff not working, or is it about Git not working, or both? Commented Jun 27, 2016 at 14:13
  • Where is your code in git? Commented Jun 27, 2016 at 14:15
  • @TimBiegeleisen HTML stuff is working, but I am confused about CSS part, i.e how do I add CSS code ? Commented Jun 27, 2016 at 14:32
  • The answer by @zooted looks on the right track. Maybe you should remove the GitHub tag Commented Jun 27, 2016 at 14:32
  • Here, in the SO, you can add HTML code by using the <apostrophe>. :-) Commented Jun 27, 2016 at 14:55

2 Answers 2

2

Store the CSS file in the same folder as the HTML file, then reference it in your HTML with a link tag.

<link href="style.css" rel="stylesheet">

Sign up to request clarification or add additional context in comments.

Comments

0

I wrote the html code in Read.md file.

GitHub allows you to write a README using Markdown. One of the features of Markdown is that it supports embedding of HTML.

As implemented by GitHub, however, it does not support stylesheets.

You can't use a custom stylesheet in your README.

1 Comment

Alright, thanks a lot, I shall go through the guide provided in github in detail. And sorry for being unclear about my question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.