Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8741663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:21:25+00:00 2026-06-13T11:21:25+00:00

I have created a three page web page and I’m using an external css

  • 0

I have created a three page web page and I’m using an external css stylesheet that is adjusting my navigation lists so they go across the top and have a coloured background.

When I try and create a list on a page within a table the indenting and vertical listing don’t work.
I traced the issue to the external style sheet.

How do I go about turning off the settings the stylesheet did so I can properly format the list?

[EDIT- Okay, so I did a work around. I removed the external stylesheet link as was suggested and put all the style info into my head. Then I did a div around the ul and another around the li which seems to half way gotten it working. Around the li I set the width:50px and that got my vertical listing working. The list-style-type:square still doesn’t do anything but I’m too fed up to care anymore for tonight.]

<!DOCTYPE html>
<html>
<head>
<title>Elex267-Webpage</title>
<link rel="stylesheet" type="text/css" href="myStyle.css">
</head>

<body>
<!-- Banner at Top of Page ***********************************-->
<div style="background-color:blue; color:white;font-size:30px;">

<img src="Pics/camosun-white.png" alt="CamosunPNG" width="200" height="70" align="left">
<div align="center"style="margin-left:50%">Elex 267 Web Demo
<br>
Microchip TCP/IP Stack v3.02</div>
</div>
<!--*********************************************************-->
<!--NavBar Code *********************************************-->
<ul>
<li><a href="index.htm">Home</a></li>
<li><a href="features.htm">Features</a></li>
<li><a href="about.htm">About</a></li>
</ul>
<!--***************************************************-->
<h1>
Welcome to the features page of the website.<br>
</h1>
<p>
This web page is being run on the NM101 NorthMicro Pic Prototype Board with the LCD/Keypad and Network modules.
<br>
Features are:
</p>
<table border="1">
<tr>
<td>
<p>This is a paragraph</p>
<p>This is another paragraph</p>
</td>
<td>This cell contains a table:
<table border="1">
<tr>
 <td>A</td>
 <td>B</td>
</tr>
<tr>
 <td>C</td>
 <td>D</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>This cell contains a list
<ul>
 <li>apples</li>
<li>bananas</li>
<li>pineapples</li>
</ul>
</td>
<td>HELLO</td>
</tr>
</table>

</body>
</html>

<!-- And the External CSS Stylesheet Code -->

 p {color:black;font-size:20px;background-color:white;}
 body {background-color:white;}
 ul{list-style-type:none;margin:0;padding:0;overflow:hidden;}
 li{float:left;}
 a{display:block;width:400px;background-color:#ff0000;color:white;}
 a:hover,a:active{background-color:#cc0000;}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:21:26+00:00Added an answer on June 13, 2026 at 11:21 am

    I just read your edit, and while it seems you’re gone I am going to answer anyway. Don’t give up. CSS can be frustrating to troubleshoot and troublesome to implement in the beginning. Inline styles, font tags hell it all seems ever so much easier, until you realize the actual power that CSS gives you over your styling. I think what you should do is step away from your work for a little bit and do some reading on CSS so you’re better understanding what it is you’re doing, I’m going to give you a couple of tips here that should help with the issues at hand, but I still think you need to read more.

    • Get the styling OUT of the head and back into an external style sheet, that is the worst advice you could have possibly been given.

    • Read up on specificity first. That is how CSS decides which rule applies if there are conflicting rules. For example take this code:

      a{color:blue;text-decoration:underline;font-weight:bold;}
      p{color:red;}
      a{color:green;font-weight:normal;}
      

    Your links are going to turn out green, underlined and normal weight. This is because the green and normal weight came after the blue and bold in the order of how it was read, this is the simplest of the rules, there are others like is it inline, is it an id or a class etc. Read the rules and you’ll understand how to write your CSS to get the rules to apply where you want them. This is where the terrible “put it in the head” advice came from because that CSS will be applied after external CSS. Still doesn’t make it the right way to do it.

    • Learn about Classes and ID’s. Just quickly ID’s are unique names you can apply to elements for example you could then style just that ID in your CSS with #mainNav{color:blue} the thing to remember about ID’s is they are UNIQUE. Do not use 5 UL’s with the ID of mainNav (the main reason for this is so you can use them to identify them, say in js or jQuery for example). If you have multiple things that need the same styling you use classes, the nice thing about classes is you can chain them so for an easy example consider the following code:

    .blue{color:blue}
    .underlined{text-decoration:underline}
    .bold{font-weight:bold}
    

    Seems sort of dumb on first reading but now look at how you could apply that.

    <p class="bold blue">This is some blue text<span class="underlined"> some of it is underlined</span> and some of it isn't</p>
    

    This is where you need to look to solve your problem. If you wanted to apply those list styles just to your nav, adding a class would solve it cascading to other lists. See the following:

    .nav ul{list-style-type:none;margin:0;padding:0;overflow:hidden;}
    .nav li{float:left;}
    .nav a{display:block;width:400px;background-color:#ff0000;color:white;}
    .nav a:hover,a:active{background-color:#cc0000;}
    
    <div class="nav">
       <ul>
           <li></li>
       </ul>
     </ul>
    

    Any other lists you create wouldn’t take on those styles. Basically you want your external style sheet to start with your basics then get more specific as you go. So the styles you want on every list go at the top and go on the ul and li or ol and li elements, then as you go further down the sheet you can get more specific.

    Stay away from inline CSS
    Stay away from CSS in the head

    Trust me, learn to do it right and you’ll be so happy you’ll never understand why you did it any other way. Make use of the Chrome inspect element to trace down why something is displaying a certain way and then fix the CSS, forget these hack ways of fixing it. Fix it right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dynamically created TextBox in a C#/ASP.NET web page that I want
Using IIS 7.5 I have created a custom 404 (and 403.14) error page that
I have created a makefile for the generation of a simple web page. The
I have web page in ASP.NET. I have created Tree View control with jQuery.
I have created a small database (couchdb) and web page (html5 boilerplate). My end
I have a simple web page that displays some text and images and trying
I am creating a web crawler using Java EE Technologies. I have created a
Here's the problem....I have three components...A Page that contains a User Control and a
Hopefully an easy one, I have created a Custom Repeater control that extends System.Web.UI.WebControls.Repeater.
Basically I have created web page from scratch and written a lot of code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.