HTML question

Frank1

New member
Power User
VIP
Local time
7:06 PM
Messages
394
Location
Ohio
I am taking an on line HTML tutorial. On my web page that I am making, I am trying to center a graphic. I'm getting it done, but not in the way that I should do it according to the tutorial. Of course, it's possible that I'm am misunderstanding the lesson. According to the instructions, if I want to center the image the code should be: <img align= center src="name of file"> when I do it that way, the image is on the left side. However, if I put: <img <center> src="name of file"></center> it will put the image at the center of the page as I want it. Is there something that I am not understanding?
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion g7-1260us Notebook
OS
Desk Top with Win 7 Home Premium 64 bit and Lap Top with Windows 8.1 Pro 64 bit
Memory
8Gig
Screen Resolution
1600x900
This may be browser specific issue you are having. Try this code, it should work <img src="name of file" align="center">

This code should also work, and is a correct tag:

<center><img src="name of file"></center>

A Guy
 

My Computer

Computer type
PC/Desktop
OS
Windows 10 Home x64
CPU
INTEL Core i5-750 Quad-Core 3.37GHz
Motherboard
ASUS P7P55D
Memory
HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
Graphics Card(s)
EVGA GeForce GTX 750 Superclocked 1GB 128-Bit GDDR5
Monitor(s) Displays
LG 32MA68HY 32" IPS
Screen Resolution
1920 x 1080
Hard Drives
Samsung 840 Evo 120GB, SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
PSU
ANTEC TruePower New TP-550, 80 PLUS, 550W
Case
ANTEC Three Hundred Illusion
Cooling
COOLER MASTER Hyper 212 Plus, 4 x 120mm 1 x 140mm Noctua's
Internet Speed
85 + Mbps
Antivirus
Avast
Browser
Vivaldi

My Computer

Computer Manufacturer/Model Number
Systemax N2000 Gaming PC
OS
Windows 7 Ultimate x64
CPU
Q6600 @2.4ghz (G0 stepping)
Motherboard
XFX nforce 680i LT
Memory
8 gb OCZ vista essential sli PC-6400
Graphics Card(s)
Dual 9800gt in SLI mode
Sound Card
Integrated 8.1 High Definition Audio
Monitor(s) Displays
Dual Sceptre x246w 24 inch monitors
Screen Resolution
1920 x 1200 each monitor
Hard Drives
500 GB SATA II / 7500 rpm
PSU
Cooler Master Real Power Pro 1250W
Case
N2000 server tower
Cooling
Thermaltake Bigwater 760 is
Keyboard
MS Intelitype 6000 v2.0
Mouse
MS Intelipoint 6000
Internet Speed
Wi-power 1.5GB up / 512k down
Other Info
Windows 7 Ultimate x64, Windows 7 Pro x64, Windows Home Premium X86, Windows XP pro, Windows Home Server x86, Ubuntu 10.4 x86 and x64, Ubuntu server 10.4, SQL Server 2005, MySQL 5.0
This may be browser specific issue you are having. Try this code, it should work <img src="name of file" align="center">

This code should also work, and is a correct tag:

<center><img src="name of file"></center>

A Guy
I tried both and the only one that works is <center>img src="file name"></center>
But here's what seems crazy. After I read your what you said about it passably being a browser issue, I downloaded and installed IE 9 and I still get the same results. I even tried it on my netbook and got the same result. I then thought that maybe there is something with the file itself--possible some sort of code that I put above it that may be causing the problem. So, I made a fresh and simple new HTML file. I got the same results there. So, it's crazy--that tag should work. Thank for your response though. :confused:
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion g7-1260us Notebook
OS
Desk Top with Win 7 Home Premium 64 bit and Lap Top with Windows 8.1 Pro 64 bit
Memory
8Gig
Screen Resolution
1600x900
Back
Top