Thread: Text Help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Text Help


    So I keep trying to add text within a div using a .class but when ever I do this, the only way to edit the text is through the div and not the class?

    The Title, and Subtitle work but not the info.

    HTML:
    Code:
    <html>
    <head>
    <link href="mystyle.css" rel="stylesheet" type="text/css" />
    <title>TheWebFanatic</title>
    <div id="nav">
    <p class="title"><a href="#">NsTyGaming<span class="subtitle">.com</span></a></p>
    <ul id="navigation">
    <li><a href="#">Home</a></li>
    <li><a href="#">Who Are We?</a></li>
    <li><a href="#">Contact Us</a></li>
    <li><a href="#">Forums</a></li>
    </ul>
    </div>
    <div id="infobar">
    <div align="center"><a><span>NsTyGaming</span>
    <p class="info"><a>Nsty AMD, Nsty JTT, Nsty Assassin</a></p>
    </div>
    </div>
    </head>
    <div id="poop">
    <body>
    CONTENT
    </div>
    </body>
    </html>
    CSS:
    Code:
    body 
    {
    background: #d4d4d4;
    margin:0px;
    color: black;
    }
    
    
    #nav
     {
    background: url(images/topbar.png);
    width:100%;
    height:50px;
    position:fixed;
    top:0px;
    margin-top:0px;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    
    }
    
    .title
     {
    color:#EDEDED;
    font-family:verdana;
    font-size:25px;
    width:350px;
    margin-top:10px;
    margin-left:150px;
    font-weight:bold;
    float:left;
    }
    .subtitle 
    {
    color:#EDEDED;
    font-family:verdana;
    font-size:15px;
    }
    
    #navigation
    {
    list-style-type:none;
    }
    li 
    {
    display:inline;
    padding:15px;
    margin-top:10px;
    }
    #nav a
    {
    font-family:verdana;
    text-decoration:none;
    color:#EDEDED;
    }
    #nav a:hover 
    {
    color:#BDBDBD;
    }
    
    
    #infobar
     {
    color:white;
    background: url(images/topbar.png);
    width:100%;
    height:25px;
    position:fixed;
    top:50px;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    padding-top: 2px;
    {
    
    .info {
    color:white;
    font-size:10px;
    }
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    1
    Rep Power
    0
    Hi Adam,

    I think the problem here is that your <body> element needs to be below your <title> elements and below a closing </head> element.

    Remember the <head> element is used for enclosing your web page title and can include your styles, scripts and meta information amongst others, don't put your <div> tags between your <head> elements.

    Code:
    <html>
    <head>
    <title>TheWebFanatic</title>
    <link href="mystyle.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="nav">
    <p class="title"><a href="#">NsTyGaming<span class="subtitle">.com</span></a></p>
    <ul id="navigation">
    <li><a href="#">Home</a></li>
    <li><a href="#">Who Are We?</a></li>
    <li><a href="#">Contact Us</a></li>
    <li><a href="#">Forums</a></li>
    </ul>
    </div>
    <div id="infobar">
    <div align="center"><a><span>NsTyGaming</span>
    <p class="info"><a>Nsty AMD, Nsty JTT, Nsty Assassin</a></p>
    </div>
    </div>
    <div id="poop">
    CONTENT
    </div>
    </body>
    </html>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    54
    Rep Power
    1
    I believe that your coding template is off. You will want to have all your text inside of the body tag.

    SO try this:
    Code:
    <html> 
    <head> 
    <link href="mystyle.css" rel="stylesheet" type="text/css" /> 
    <title>TheWebFanatic</title> 
    </head> 
    
    
    <body> 
    <div id="poop"> 
    <div id="infobar">
     <div align="center">
    <a><span>NsTyGaming</span> 
    <p class="info"><a>Nsty AMD, Nsty JTT, Nsty Assassin</a></p> 
    </div> 
    </div> 
    
    <div id="nav"> 
    <p class="title">
    <a href="#">NsTyGaming<span class="subtitle">.com</span></a></p> 
    <ul id="navigation">
          <li><a href="#">Home</a></li>
          <li><a href="#">Who Are We?</a></li> 
          <li><a href="#">Contact Us</a></li> 
          <li><a href="#">Forums</a></li> </ul> 
    </div> 
    CONTENT 
    </div> 
    
    </body> 
    </html>

IMN logo majestic logo threadwatch logo seochat tools logo