It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

How do I align center an image?

page: 1
3

log in

join
share:

posted on Sep, 21 2013 @ 02:58 PM
link   
If I use the
[ align=center][/align ] (I added spaces to show the tag)
and an image link [ pic][/pic ] I get the text [align=center] then my photo left justified.

What sort of HTML voodoo is this???

Any help is appreciated.
edit on 21-9-2013 by abeverage because: (no reason given)



posted on Sep, 21 2013 @ 03:15 PM
link   
reply to post by abeverage
 


... my photo left justified.

I think only text can be centered and pictures can't. Its always been this way. Sorry if I am mistaken.



posted on Sep, 21 2013 @ 03:20 PM
link   
Try this....


Placing the Image On The Page

First, let's worry about placing the image somewhere on the page. If you place an image tag on a page randomly, the image will usually show up on the left side of the page. If you want to have an image placed in the center of the page, you use the CSS, 'text-align: center;' as described in Primer #3. But how do we get the image to show up on the right side of the page? Well, how did we get text to the right? By adding the 'text-align: right;' CSS code, right? Could it be that we do the same thing here? Why yes, it could.

Here's the format:

(div style="text-align: center;")(IMG "image.gif" ALT="image")(/div)

Source

Google isn't just a friend to those in need...I'd be lost without it. lol.... Good luck with what you're working on.

*** How silly of me.. The page isn't going to render the code because it is code. Anyway, remove the ( )'s and replace them with the appropriate "", in the same way.

edit on 21-9-2013 by Wrabbit2000 because: (no reason given)



posted on Sep, 21 2013 @ 03:43 PM
link   
reply to post by Wrabbit2000
 


Meh...perhaps next time. I got fed up! Thank you for your help though!



posted on Sep, 21 2013 @ 03:44 PM
link   
reply to post by Wrabbit2000
 


Ah a wrabbit to the rescue. Many thanks. I'm now reading your posts to see what I can learn. Merci buckets.



posted on Sep, 21 2013 @ 04:30 PM
link   
I believe you want to do this:

[atsimg]http://files.abovetopsecret.com/files/img/rc523bd474.jpg[/atsimg]

Right?

ETA: Oops, hit reply instead of preview. Anyway, the tag for centering is [ atsimg] [/ atsimg]. Left and right justification is [ imgl] [/ img] and [ imgr] [/ img], respectively. You can quote this post to see the coding, and you have to use the full url.


edit on 9/21/13 by Druid42 because: added ETA.



posted on Sep, 21 2013 @ 04:59 PM
link   
reply to post by Druid42
 

Thank you a million for that! I knew the HTML div solution the hard way of having to solve that problem. I sure didn't know the ATS way and it's always killed me that I couldn't center my images on the really big threads I put a ton of time into making. I owe ya one! (thumbs up)



posted on Sep, 21 2013 @ 05:38 PM
link   

Druid42
I believe you want to do this:

[atsimg]http://files.abovetopsecret.com/files/img/rc523bd474.jpg[/atsimg]

Right?

ETA: Oops, hit reply instead of preview. Anyway, the tag for centering is [ atsimg] [/ atsimg]. Left and right justification is [ imgl] [/ img] and [ imgr] [/ img], respectively. You can quote this post to see the coding, and you have to use the full url.


edit on 9/21/13 by Druid42 because: added ETA.


Yes but I also wanted center aligned Text...
edit on 21-9-2013 by abeverage because: (no reason given)



posted on Sep, 21 2013 @ 05:41 PM
link   
reply to post by Wrabbit2000
 


No problem there, glad to help.

The coding on ATS is rather unique to standard bbcode, but if it works, I'm not complaining.




posted on Sep, 21 2013 @ 06:02 PM
link   
reply to post by abeverage
 


Ok.

How about:

SOME CENTERED TEXT ABOVE


[atsimg]http://files.abovetopsecret.com/files/img/rc523bd474.jpg[/atsimg]

SOME CENTERED TEXT BELOW



Well, that looks like crap.

ETA: I'd recommend putting your text into image format.

[atsimg]http://files.abovetopsecret.com/files/img/nt523e2aca.gif[/atsimg]
[atsimg]http://files.abovetopsecret.com/files/img/rc523bd474.jpg[/atsimg]
[atsimg]http://files.abovetopsecret.com/files/img/yo523e2adf.gif[/atsimg]

ATS doesn't handle text and images in the same way, so the alignment is off. Converting to images for text is my immediate solution. I'll be checking into this, just to see if I can figure it out.



edit on 9/21/13 by Druid42 because: added ETA.



posted on Sep, 21 2013 @ 06:25 PM
link   

Druid42
reply to post by abeverage
 


Ok.

How about:

SOME CENTERED TEXT ABOVE


[atsimg]http://files.abovetopsecret.com/files/img/rc523bd474.jpg[/atsimg]

SOME CENTERED TEXT BELOW



Well, that looks like crap.



HAHA! Now your getting the picture (pun intact)



posted on Sep, 21 2013 @ 06:30 PM
link   
reply to post by abeverage
 


I'll tinker with it a bit, now that my curiosity is involved. See my edit above for a short term solution.




posted on Sep, 21 2013 @ 06:53 PM
link   
reply to post by Druid42
 


Well thanks for the effort. I fiddled with it for far to long, now I am just frustrated and just posted what I wanted to without it. Again thanks.



posted on Nov, 24 2013 @ 01:57 AM
link   
I tried using the bbcode css tag which sometimes works… couldn't get it to. Would have been a solution


Oops on bumping an older thread. I was curious if I could get it to work.
edit on 24-11-2013 by Lucid Lunacy because: (no reason given)



posted on Jan, 26 2014 @ 04:22 AM
link   
If you are asking about how to center and image in the middle of the screen you'd do this.

CSS

html [
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: #232220;
]

body [
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: url('images/yourimage.png') 50% 50% no-repeat;
]



edit on 26-1-2014 by preyevut1 because: (no reason given)



posted on Sep, 22 2014 @ 11:23 PM
link   
a reply to: abeverage

That would be the difference between BB Code and HTML Code. You can not as far as I know.



posted on Sep, 23 2014 @ 12:20 AM
link   
a reply to: abeverage

I'm a little rusty, but you must have put a align justify tag surrounding this Center imag e tag. You will need to find it and move the justify end tag /> up above this image tag you want entered.
If that's what you meant if you are talking about html code for websites and not ATS bb code


edit on 23-9-2014 by violet because: (no reason given)

edit on 23-9-2014 by violet because: (no reason given)



posted on Sep, 23 2014 @ 12:24 AM
link   
Oh this is an old thread ??



posted on Sep, 23 2014 @ 08:40 AM
link   
a reply to: violet


Very old...




top topics



 
3

log in

join