CSS trouble

CSS trouble

Page 1 of 1

5 Replies - 957 Views - Last Post: 13 December 2008 - 10:03 PM

#1 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

CSS trouble

Post icon  Posted 13 December 2008 - 07:59 PM

why doesnt the CSS i wrote surround my links? surround my links?

CSS:

 .links {
		border-color: black;
		border-width:	1px;
		border-style:	solid;
		background-color: #a7cece;
		padding:	25px;
} 


html:

 <p class="links">	
	<li><a href="http://www.basketball.com">Slymaste Forums</a></li>
	<li><a href="comingsoon.html">Coming Soon</a></li>
</p> 


thanks! for helping!

Is This A Good Question/Topic? 0
  • +

Replies To: CSS trouble

#2 fashionnugget  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 164
  • Joined: 25-November 08

Re: CSS trouble

Posted 13 December 2008 - 09:09 PM

Use divs for this sort of thing instead...

Try this:
HTML
<div id="links">
<li><a href="http://www.basketball.com">Slymaste Forums</a></li>
<li><a href="comingsoon.html">Coming Soon</a></li>
</div>


CSS
#links {
		border-color: black;
		border-width:	1px;
		border-style:	solid;
		background-color: #a7cece;
		padding: 25px;
}



HTH

This post has been edited by fashionnugget: 13 December 2008 - 09:10 PM

Was This Post Helpful? 0
  • +
  • -

#3 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

Re: CSS trouble

Posted 13 December 2008 - 09:20 PM

yes it worked thank you very much.
one more thing, how can i put that on the left side of my website?
Was This Post Helpful? 0
  • +
  • -

#4 fashionnugget  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 164
  • Joined: 25-November 08

Re: CSS trouble

Posted 13 December 2008 - 09:26 PM

Well, unless there's more code you haven't posted, it's already on the left side, if you mean have it touch the left side then you need to make a body tag in css that will get rid of the margin it has on default

CSS
body 
{
margin: 0 auto;
}


This gets rid of the top right bottom and left borders. I hope that's what you meant, if not post all the code for your website so I can see exactly what it looks like.
Was This Post Helpful? 0
  • +
  • -

#5 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

Re: CSS trouble

Posted 13 December 2008 - 09:35 PM

no i meant how can i put all of my links on the left side of the page right now there on top of everything, but i want them on the left like how it is on most websites heres my sites code and css code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtm11/DTD/xgtm11-strict.dtd">
 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 	

	<head>
		<title>welcome</title>
		<link type="text/css" rel="stylesheet" href="index.CSS">
		
	</head>
	
<div id="links">	
	<li><a href="http://www.basketball.com">Slymaste Forums</a></li>
	<li><a href="comingsoon.html">Coming Soon</a></li>
	<li><a href="games.html">Games</a></li>
</div>

<body>
<h1><center> Welcome! </center></h1>

<img src="images/jordan.gif">

<p><center>
blahblahblahblahblah
   </center>
</p><hr>

   <h2>Domain name</h2>
		<p>
		We will soon have an actual domain name so be patient... and please stay active on the foums!!!
		</p>
		
	</body>

</html>



CSS:

body {
		background-color: teal;
		font-family: sans-serif;
}

h1, h2 {
		color:	blue;
		font-size:	30px;
}

h1 {
		border-bottom: 1px solid black;
}

p {
		color:	yellow;
}

em {
		font-family:	georgia;
		font-weight:	bold;
		text-decoration:	underline;
}

#links {
		line-height:	1.9em;
		font-style:		bold;
		font-family:	Georgia;
		color:			#444444;
		border-color: black;
		border-width:	1px;
		border-style:	solid;
		background-color: #a7cece;
		padding:	25px;
		margin:		30px;
}

#links a:hover {
	background: #007e7e;
	color: #333333;



thanks again!
Was This Post Helpful? 0
  • +
  • -

#6 sly  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 134
  • Joined: 05-December 08

Re: CSS trouble

Posted 13 December 2008 - 10:03 PM

nvm i found out how but thanks again!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1