473,666 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS file is only running part of the code

2 New Member
I'm building a website, but my HTML and CSS are bugging me. When I load my website through Github Pages, or through local files, I can see my HTML and it all works perfectly fine. The problem is, only part of my CSS is loading.

On my website, I made a sidebar, and when I tested it through local files it worked fine. Yesterday I opened Notepad++ (I can't install VSCode on this computer) and opened my website to test what size font was the best.

When I opened it, some of the CSS didn't work. My background image is gone, and my sidebar was moved to under my text, and also it expanded the entire screen. Also, all of my colours were removed from my sidebar. I tried this with GitHub pages, but it was also bugged there with defect tracking tools.

Some of my CSS is still working, but around half is not working. I made a new CSS and HTML document and copied all of the code, changing the link and it was still bugged.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html> 
  3. <head>
  4. <link rel="stylesheet" href="GithubTestCSS.css">
  5.  
  6.     <h1 style="text-align:center; color: #fff; font-size: 40px;  font-family: Comic Sans MS; margin-left: 425px; "> Text <h1>
  7.         <div class="main-text">
  8.             <p> text</p>
  9.             <p> text</p>
  10.             <p> text </p>
  11.             <p> text </p>
  12.             <p> text </p>
  13.  
  14.         </div>
  15.  
  16. </head>
  17. <body>
  18.  
  19.   <header class="header" role="banner">
  20.  
  21.   <div class="logo">
  22.     <a href="#">Home</a>
  23.   </div>
  24.  
  25.   <div class="nav-wrap">
  26.     <nav class="main-nav" role="navigation">
  27.  
  28.       <ul class="unstyled list-hover-slide">
  29.  
  30.         <li><a href="#">Poems</a></li>
  31.         <li><a href="#">Collages</a></li>
  32.         <li><a href="#">Art</a></li>
  33.         <li><a href="#">Infographics</a></li>
  34.  
  35.       </ul>
  36.  
  37.     </nav>
  38.    </div>
  39.  
  40. </head>
  41. </body>
  42. </html>
  43.  
Expand|Select|Wrap|Line Numbers
  1.  
  2.   .bg-text {
  3.   position: center;
  4.   background-color: rgb(0,0,0); /* Fallback color */
  5.   background-color: rgba(0,0,0, 0.6); /* Black w/ slight opacity see-through */
  6.   color: white;
  7.   font-weight: bold;
  8.   font-size: 28px;
  9.   border: 5px solid #f1f1f1; 
  10.   position: fixed;
  11.   margin-right: 50px;
  12.   margin-top: 50px;
  13.   margin-bottom: 20px;
  14.   padding: 5px; 
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21.   .unstyled a {
  22.     text-decoration: none;
  23.   }
  24.  
  25.   .list-inline {
  26.     overflow: hidden;
  27.   }
  28.   .list-inline li {
  29.     float: left;
  30.   }
  31.  
  32.  
  33.   .logo {
  34.     font: 100 1em "Source Sans Pro", Helvetica, Arial, sans-serif;
  35.     text-align: center;
  36.     padding: 0;
  37.     margin: 0;
  38.   }
  39.  
  40.   /* The logo (top of sidebar*/
  41.  
  42.   .logo a {
  43.     display: block;
  44.     padding: 1em 0;
  45.     color: #03A062;
  46.     text-decoration: none;
  47.     transition: .75s linear color;
  48.   }
  49.  
  50.  
  51.   /* The sidebar */
  52.  
  53.   .main-nav ul {
  54.     border-top: solid 1px #3C3735;
  55.   }
  56.   .main-nav li {
  57.     border-bottom: solid 1px #3C3735;
  58.   }
  59.   .main-nav a {
  60.     padding: 1.1em 0;
  61.     color: #03A062;
  62.     font: 400 1.125em "Source Sans Pro", Helvetica, Arial, sans-serif;
  63.     text-align: center;
  64.   }
  65.   .main-nav a:hover {
  66.     color: #03A062;
  67.   }
  68.  
  69.  
  70.   .list-hover-slide li {
  71.     position: relative;
  72.     overflow: hidden; 
  73.   }
  74.   .list-hover-slide a {
  75.     display: block;
  76.     position: relative;
  77.     z-index: 1;
  78.     transition: .75s ease color;
  79.   }
  80.   .list-hover-slide a:before {
  81.     content: '';
  82.     display: block;
  83.     z-index: -1;
  84.     position: absolute;
  85.     left: -100%;
  86.     top: 0;
  87.     width: 100%;
  88.     height: 100%;
  89.     border-right: solid 5px #03A062;
  90.     background: #3C3735;
  91.     transition: .75s ease left;
  92.   }
  93.   .list-hover-slide a.is-current:before, .list-hover-slide a:hover:before {
  94.     left: 0;
  95.   } 
  96.   .testing-text{
  97.       text-align: center;
  98.       color: #fff;
  99.   }
  100.  
Please help me in this
Jan 24 '22 #1
2 11086
NeoPa
32,568 Recognized Expert Moderator MVP
Hi CloudyTechi.

Welcome to Bytes.com.

Your post seems fine but you must post technical questions in the appropriate forum. They are never allowed in the Lounge - which is where members hang out and chill, away from all the questions.

Good luck with your question here.

-Ade (Admin).
Jan 24 '22 #2
dev7060
644 Recognized Expert Contributor
Expand|Select|Wrap|Line Numbers
  1.  
  2. <html> 
  3. <head>
  4. <link rel="stylesheet" href="GithubTestCSS.css">
  5.  
  6.     <h1 style="text-align:center; color: #fff; font-size: 40px;  font-family: Comic Sans MS; margin-left: 425px; "> Text <h1>
  7.         <div class="main-text">
  8.             <p> text</p>
  9.             <p> text</p>
  10.             <p> text </p>
  11.             <p> text </p>
  12.             <p> text </p>
  13.  
  14.         </div>
  15.  
  16. </head>
  17. <body>
  18.  
  19.   <header class="header" role="banner">
  20.  
  21.   <div class="logo">
  22.     <a href="#">Home</a>
  23.   </div>
  24.  
  25.   <div class="nav-wrap">
  26.     <nav class="main-nav" role="navigation">
  27.  
  28.       <ul class="unstyled list-hover-slide">
  29.  
  30.         <li><a href="#">Poems</a></li>
  31.         <li><a href="#">Collages</a></li>
  32.         <li><a href="#">Art</a></li>
  33.         <li><a href="#">Infographics</a></li>
  34.  
  35.       </ul>
  36.  
  37.     </nav>
  38.    </div>
  39.  
  40. </head>
  41. </body>
  42. </html>
  43.  
Expand|Select|Wrap|Line Numbers
  1.  
  2.   .bg-text {
  3.   position: center;
  4.   background-color: rgb(0,0,0); /* Fallback color */
  5.   background-color: rgba(0,0,0, 0.6); /* Black w/ slight opacity see-through */
  6.   color: white;
  7.   font-weight: bold;
  8.   font-size: 28px;
  9.   border: 5px solid #f1f1f1; 
  10.   position: fixed;
  11.   margin-right: 50px;
  12.   margin-top: 50px;
  13.   margin-bottom: 20px;
  14.   padding: 5px; 
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21.   .unstyled a {
  22.     text-decoration: none;
  23.   }
  24.  
  25.   .list-inline {
  26.     overflow: hidden;
  27.   }
  28.   .list-inline li {
  29.     float: left;
  30.   }
  31.  
  32.  
  33.   .logo {
  34.     font: 100 1em "Source Sans Pro", Helvetica, Arial, sans-serif;
  35.     text-align: center;
  36.     padding: 0;
  37.     margin: 0;
  38.   }
  39.  
  40.   /* The logo (top of sidebar*/
  41.  
  42.   .logo a {
  43.     display: block;
  44.     padding: 1em 0;
  45.     color: #03A062;
  46.     text-decoration: none;
  47.     transition: .75s linear color;
  48.   }
  49.  
  50.  
  51.   /* The sidebar */
  52.  
  53.   .main-nav ul {
  54.     border-top: solid 1px #3C3735;
  55.   }
  56.   .main-nav li {
  57.     border-bottom: solid 1px #3C3735;
  58.   }
  59.   .main-nav a {
  60.     padding: 1.1em 0;
  61.     color: #03A062;
  62.     font: 400 1.125em "Source Sans Pro", Helvetica, Arial, sans-serif;
  63.     text-align: center;
  64.   }
  65.   .main-nav a:hover {
  66.     color: #03A062;
  67.   }
  68.  
  69.  
  70.   .list-hover-slide li {
  71.     position: relative;
  72.     overflow: hidden; 
  73.   }
  74.   .list-hover-slide a {
  75.     display: block;
  76.     position: relative;
  77.     z-index: 1;
  78.     transition: .75s ease color;
  79.   }
  80.   .list-hover-slide a:before {
  81.     content: '';
  82.     display: block;
  83.     z-index: -1;
  84.     position: absolute;
  85.     left: -100%;
  86.     top: 0;
  87.     width: 100%;
  88.     height: 100%;
  89.     border-right: solid 5px #03A062;
  90.     background: #3C3735;
  91.     transition: .75s ease left;
  92.   }
  93.   .list-hover-slide a.is-current:before, .list-hover-slide a:hover:before {
  94.     left: 0;
  95.   } 
  96.   .testing-text{
  97.       text-align: center;
  98.       color: #fff;
  99.   }
  100.  
- Why are lines 6-14 inside the head?
- Why use inline CSS in line 6? Where's the closing h1?
- Where's the closing header of line 19?
- There's no code that specifies the background image.
- What's with the extra </head> in line 40?

Describe or show the expected result and arrangement.
Jan 26 '22 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1632
by: Andrew Wrigley | last post by:
Hi I have a database that works OK except in two regards, that I suspect are related. Problem 1. After even minor changes to a form module (ContactFrm), such as editing a comment, I hit the save button and instead of a quick save, the VBE window spends at least a minute jittering between (Running) and (Code). By this I mean that you can see two alternative messages in the title bar of the VBE window (ESG is the project name):
2
1780
by: TB | last post by:
I am seeing a very strange problem as follows... I have a loop where a fair amount of processing is going on and near the top of the loop I access a class that has only static helper functions to perform some calculations. After some number of iterations, randomly, I'll get an uncaught NullValueException error on one of these calls, as if the class name is being treated as an object reference and is null. Here is some psuedo-code to...
1
1285
by: Tobias Nilsson | last post by:
I have almost exactly the same problem as the guy below. Is it NOT possible running .NET code locally in Internet Explorer WITHOUT a webserver???? I've done some C# code and compiled to a .dll ... using the OBJECT tag and CLASSID all works fine when I upload it to a webserver... but trying to run it locally without IIS the object till not execute (why should I use IIS btw when it's 100% clientcode?) I've read that CLASSID only support...
2
5414
by: Peter Krikelis | last post by:
Hi, I have a C++ code. I tried to open and run in in VC++.Net and it gave me an error: fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory Somehow it did not find the standard C++ library. And the question is what do I need to do in order to run the C++ code in VC++.Net and get it working or can I do it at all. What should I do with the not found getopt.h library?
4
2805
by: Jason | last post by:
I need to open a file for reading, but I only know part of it's name. The file I want to read is in the format of xxx-yyyy-zzz.EXT The last three digits of the file name are different on each pc, for example PC7 has xxx-yyyy-zz1.ext PC5 has xxx-yyyy-zz2.ext PC3 has xxx-yyyy-zz8.ext
5
2285
by: JoeW | last post by:
Hi, I'm trying to create an ASP page which gets its content from a txt file. eg. I have a txt file which contains this: <html> <head> <title>PageTitle</title> </head> <body> Page Content
0
1060
by: thunder6 | last post by:
Hi, Can anyone please help me to make only a part of the text in a DataGridView cell bold, it shud look like this Size(in KB). Im trying to do this in a windows application Thank you
0
1144
by: John A. Bailo | last post by:
I have a web application project that (after it was moved) got into a state where it has no project file. It's part of a solution but the project header just points to a directory. Is there a way I can easily add a project file and have it take in all the existing web application code?
2
1644
by: peter | last post by:
I'm not sure if this query should be directed to comp.lang.python or comp.os.linux.misc so I intend to post it to both with apologies if it's inappropriate on either. I have a small python utility which I wrote myself and which crawls through a directory comparing all possible pairs of files. Under Windows it works fine, while the same code under Linux (Fedora Core 3) works for a while then starts continuously throwing up the following...
1
1771
by: soumen dey | last post by:
while running this code java.lang.nullpointerexception is showing. how to overcome? <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <%@ page language="java" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7378
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.