9 Replies - 1107 Views - Last Post: 23 February 2010 - 03:00 PM

#1 EnvXOwner   User is offline

  • D.I.C Lover
  • member icon

Reputation: 358
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Some problems with my website

Posted 22 February 2010 - 04:25 PM

I'm making a website that I'm having a few problems with. My header, which is an image is on the left of the page and I want it to be centered the code I used is
<img src="url.url" align=center>
but it doesn't work I'm wondering if there is a way to do this with CSS. I also want to put the links to my pages in the image but I don't know where to start.

My website:
Terry's blog

Is This A Good Question/Topic? 1
  • +

Replies To: Some problems with my website

#2 Excavator   User is offline

  • D.I.C Head
  • member icon

Reputation: 21
  • View blog
  • Posts: 60
  • Joined: 10-December 06

Re: Some problems with my website

Posted 22 February 2010 - 05:33 PM

Hello VB.Terry,
Add this bit highlighted in red -
body
{
background-color:#F5F5F5;
[color="#FF0000"]text-align: center;[/color]
}




/edit ... lame text coloring. I think the upgrade here still has problems.

This post has been edited by Excavator: 22 February 2010 - 05:35 PM

Was This Post Helpful? 0
  • +
  • -

#3 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Some problems with my website

Posted 22 February 2010 - 05:39 PM

@Excavator You've never been able to do that here on Dream.In.Code. If the text is inside code tags you cannot highlight a specific line like that :)
Was This Post Helpful? 0
  • +
  • -

#4 Excavator   User is offline

  • D.I.C Head
  • member icon

Reputation: 21
  • View blog
  • Posts: 60
  • Joined: 10-December 06

Re: Some problems with my website

Posted 22 February 2010 - 05:44 PM

View PostPsychoCoder, on 22 February 2010 - 04:39 PM, said:

@Excavator You've never been able to do that here on Dream.In.Code. If the text is inside code tags you cannot highlight a specific line like that :)


It's pretty handy to highlight the line or two that was changed. Especially for new coders. If you quote enough of their original code and highlight your edits, it makes it more obvious what was changed and where it goes.

I'm sorry if I came off like I was complaining, I didn't mean to. There is nothing wrong with this forum, it's just different than I'm used to.
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Some problems with my website

Posted 22 February 2010 - 05:46 PM

I didn't take it as complaining, just wanted to let you know that it never worked like that with this forum software and syntax highlighting they're using :)
Was This Post Helpful? 0
  • +
  • -

#6 kewlkreator   User is offline

  • D.I.C Lover
  • member icon

Reputation: 39
  • View blog
  • Posts: 1,068
  • Joined: 25-March 09

Re: Some problems with my website

Posted 22 February 2010 - 07:36 PM

Try doing this:
<img src="stuffs.jpg" style="float:left;" />


Take a look here: http://www.w3schools...S/css_float.asp

Hope that helps!
Was This Post Helpful? 0
  • +
  • -

#7 Lemur   User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1442
  • View blog
  • Posts: 3,622
  • Joined: 28-November 09

Re: Some problems with my website

Posted 22 February 2010 - 09:20 PM

margin-left:auto;
margin-right:auto;
text-align:center;



@kewl - Center, not left...

As far as image links
<a href="page.html"><img src="bob.gif" /></a>


And make sure to set
img{border:0;}

Was This Post Helpful? 1
  • +
  • -

#8 EnvXOwner   User is offline

  • D.I.C Lover
  • member icon

Reputation: 358
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Some problems with my website

Posted 23 February 2010 - 03:29 AM

View PostLemur, on 22 February 2010 - 08:20 PM, said:

margin-left:auto;
margin-right:auto;
text-align:center;



@kewl - Center, not left...

As far as image links
<a href="page.html"><img src="bob.gif" /></a>


And make sure to set
img{border:0;}

I don't want the image in the links I want all the links in that one picture. I mixed up some of the other post on here and this is what I got.
Was This Post Helpful? 1
  • +
  • -

#9 Excavator   User is offline

  • D.I.C Head
  • member icon

Reputation: 21
  • View blog
  • Posts: 60
  • Joined: 10-December 06

Re: Some problems with my website

Posted 23 February 2010 - 10:43 AM

Good morning VB.Terry,
Maybe this is what you're trying to do?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {background: #000;}
* {
	margin: 0;
	padding: 0;
}
#container {
	width: 800px;
	margin: 30px auto;
	overflow: auto;
	font-size: 0.8em;
}
#header {
	height: 300px;
	background: url(http://terrysblog.webs.com/Terry%27s%20Blog%20Home.jpg) no-repeat 0 0;
	overflow: auto;
}
	ul#navbar {
		margin: 250px 0 0;
		list-style-type: none;
		text-align: center;
		background: #000;
	}
	ul#navbar li {display: inline;}
	ul#navbar li a {
		text-decoration: none;
		padding: .2em 1em;
		color: #fff;
		background: #000;
	}
	ul#navbar li a:hover {
		color: #000;
		background: #fff;
	}
</style>
</head>
<body>
    <div id="container">
        <div id="header">
            <ul id="navbar">
                <li><a href="http://terrysblog.webs.com/Terry%27s%20Blog.html">Home</a></li>
                <li><a href="http://terrysblog.webs.com/Terry%27s%20Blog_Downloads.html">Downloads</a></li>
                <li><a href="http://terrysblog.webs.com/Terry%27s%20Blog_Contact%20Me.html">Contact Me</a></li>
                <li><a href="http://terrysblog.webs.com/Terry%27s%20Blog_About%20Me.html">About Me</a></li>
            </ul>
        <!--end header--></div>
    <!--end container--></div>
</body>
</html>

Was This Post Helpful? 0
  • +
  • -

#10 EnvXOwner   User is offline

  • D.I.C Lover
  • member icon

Reputation: 358
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Some problems with my website

Posted 23 February 2010 - 03:00 PM

Wow that looks a lot better than before. I thought it would never look like. Keep giving suggestions you may have.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1