Probably a simple mistake of not knowing all tags and attributes involved. I have a HTML page linked to a CSS file (I know it works, cause I can change things like background, and heading size, etc). When I try to create a navigation bar however using

#navigation {
  position: absolute;
  top: 0;
  right: 0;
  width: 10em;

all my stuff is still just listed vertically (with the things not in the <div id="navigation"> tag). I've found that if I copy and paste the information into the <style> tag of the HTML head the output works correctly. However I know that I'm not supposed to put that stuff in HTML because of it being bad practice. Can someone please set me straight?

Recommended Answers

All 4 Replies

Please post your HTML as well

Check the file path of CSS. Is it correct place? You can easily check the file path by clicking the link of your CSS in the view source. If the CSS codes has been shown, the path is correct, otherwise, your path is wrong.

Well, when I make other changes, like for example:


The new change is reflected, but the positioning doesn't translate.

My HTML is just a test demo:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="">
      Home Brew Studios | Info Page
    <link rel="stylesheet" type="text/css" media="all" href="main.css" />
    <div id="navigation">
      Does this stuff appear on the left?
          <li><a href="index.html">Home</a></li>
          <li><a href="form.html">Other Page</a></li>
        What about this stuff?
      <div id="info">
      Does this appear on the right?
        This website is made to showcase the software they we intend to make
        Granted it isn't ready yet, it is a work in progress, probably for quite a while. Check back later
      What about this?
      Or this?
    <div id="content">
      Does this appear on the right?
        This is where all the awesome stuff would go
      What about this?
      Or this?

Alright... so I seem to have solved the problem with an 'upgrade'. I was using Kodingen and was getting that issue, where things wouldn't format correctly. However, as soon as I switched to using Geany, I get the exact output I'm looking for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.