Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How do i 'Center Align' an image?
Old 08-10-2006, 05:49 AM How do i 'Center Align' an image?
Average Talker

Posts: 23
Name: Chris
Trades: 0
I want to center align my background but i don't know how? Any suggestions?

The Site
Chrisy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-10-2006, 09:08 AM Re: How do i 'Center Align' an image?
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
This is definitely not XHTML 1.0 Strict. You can't have two body elements. Nor does the background attribute exist in XHTML 1.0 Strict on the body element.

There is no center element, nor can it be placed in the head section. There is no align attribute for div.

There is no border attribute for images. You are using & and not & for URLs and content.

There's probably more problems but that's what I could see just by glancing at it, first fix these errors, remove the <DIV ALIGN=CENTER> and the second body element, remove that <center> element from the head, the other problems can be fixed later but won't affect the styling now.

Either in the stylesheet add/atler the body styling:
Code:
body {
  background: url('http://www.freewebs.com/extreme-soundz/bg.gif');
  width: 85%;
  margin: 0 auto;
/*  text-align: center;  */ /* Uncomment this if IE isn't centering */
}
And that should be it, but you need to clean it up.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Old 08-10-2006, 12:45 PM Re: How do i 'Center Align' an image?
Average Talker

Posts: 23
Name: Chris
Trades: 0
Ok i entered that, but the only immediate difference i could see was that it changed my font from Verdana to Times New Roman...i think i have the background pretty much fixed...but i need to fix my font back!

*EDIT*: The background appears to be centred now....

Also, in IE, my paragraph is very far down the page, but it appears correctly in Firefox.

I removed this from the start of my page, but it now appears to have messed up the page in IE...however, it agaaain appears correct in Firefox.

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

	curiously.green1.0 by nodethirtythree design
	http://www.nodethirtythree.com
	hope you enjoy it :)

-->

Last edited by Chrisy; 08-10-2006 at 12:52 PM.. Reason: Updates
Chrisy is offline
Reply With Quote
View Public Profile
 
Old 08-10-2006, 03:30 PM Re: How do i 'Center Align' an image?
Novice Talker

Posts: 7
Name: Joe Right
Trades: 0
Well, you could put in a span and then align with css or you could put whatever you wanted in a div and then align/center that using css.

Example:
<div id="whatever">
Whatever you want to center goes here.
</div>

Then with css.

<style type="text/css">#whatever {
align: 0 0 0 0;
margin: 0 0;
padding: 0 0:
}

See kinda like that. Of course, this is just an example.
__________________
Untie The Knot
Please login or register to view this content. Registration is FREE
Services.
Joe Right is offline
Reply With Quote
View Public Profile
 
Old 08-11-2006, 07:13 AM Re: How do i 'Center Align' an image?
futurevisions's Avatar
Super Talker

Posts: 102
Location: UK
Trades: 0
As a quicky, you can center align something using an inline style, like so:

<div style="text-align: center;">
<img...
</div>
futurevisions is offline
Reply With Quote
View Public Profile
 
Old 08-11-2006, 07:20 AM Re: How do i 'Center Align' an image?
Average Talker

Posts: 23
Name: Chris
Trades: 0
Thanks a lot for everyones help - i think this problem is solved !
Chrisy is offline
Reply With Quote
View Public Profile
 
Old 08-18-2006, 01:03 AM Re: How do i 'Center Align' an image?
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by Chrisy View Post
I want to center align my background but i don't know how? Any suggestions?

The Site

This site should be relative. HTML Tip: Centering Images Is Harder Than You Think Hope that helps!
__________________
Check out
Please login or register to view this content. Registration is FREE
encryptplanet is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do i 'Center Align' an image?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.00996 seconds with 12 queries