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.

CSS Forum


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



Reply
Old 03-23-2011, 11:10 AM can't align center
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
I'm trying to center an image but i cant. The image just go left or right , not middle or center.

Quote:
<img align="center" alt="image" src="../images/image.jpg">
Thanks in advance

Last edited by madseason; 03-23-2011 at 11:16 AM..
madseason is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2011, 11:22 AM Re: can't align center
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
you should try applying a "text-align: center;" declaration to the containing div.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 03-23-2011, 11:26 AM Re: can't align center
madseason's Avatar
Experienced Talker

Posts: 35
Trades: 0
Quote:
<div align=center>
<img alt="image" src="..jpg"></div>
It works

Quote:
Originally Posted by chrishirst View Post
add
Code:
margin: 0 auto;
to centre elements in the parent container.

thanks!

Last edited by madseason; 03-23-2011 at 11:31 AM..
madseason is offline
Reply With Quote
View Public Profile
 
Old 03-23-2011, 11:27 AM Re: can't align center
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
add
Code:
margin: 0 auto;
to centre elements in the parent container.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to can't align center
 

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 0.39057 seconds with 12 queries