How to center web page with CSS?

Post Reply
jmaurin

How to center web page with CSS?

Post by jmaurin »

Hi.

I'm trying to center my web page wich is using CSS to slice but no success :(

How can i do this? CSS Generated by PI (12) use absolute position for every slice-div...

My image has 800x600 and i like to center on screen....is there any way to do this??

Thank you!
mikefoster
Posts: 30
Joined: Wed Feb 08, 2006 4:30 pm
Contact:

Post by mikefoster »

go into your web page and find the 'div' tag. Then change it to this

<div align="center">
<img src="url to your image" >
</div>

if you know a bit of html, you can also place your image in a table tag like this:

<table width="100%" align="center">
<tr>
<td align="center">
<img src="">
</td>
</tr>
</table>

should work ok in IE and firefox.
do a google on style sheets and CSS and you'll find lots of examples.

Hope this helps...
Mike Foster
FREE Ulead Video based Tutorials
http://www.seeitdoit.tv
pmedia
Posts: 48
Joined: Thu Jan 05, 2006 10:14 am

but how do you go into your webpage?

Post by pmedia »

How do you go into your webpage to change this?
I would really like to know - do you do it in photo impact?
User avatar
Ron P.
Advisor
Posts: 12002
Joined: Tue May 10, 2005 12:45 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Hewlett-Packard 2AF3 1.0
processor: 3.40 gigahertz Intel Core i7-4770
ram: 16GB
Video Card: NVIDIA GeForce GTX 645
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 4TB
Monitor/Display Make & Model: 1-HP 27" IPS, 1-Sanyo 21" TV/Monitor
Corel programs: VS5,8.9,10-X5,PSP9-X8,CDGS-9,X4,Painter
Location: Kansas, USA

Post by Ron P. »

You can use an HMTL editor, or Notepad to edit HTML, which incidentally stands for Hyper Text Markup Language. If you need an HTML editor, just do a Google search, there's tons of them.
Ron Petersen, Web Board Administrator
pmedia
Posts: 48
Joined: Thu Jan 05, 2006 10:14 am

Post by pmedia »

I know you can edit with noterpad, but do you save what you have edited to Html, or in other words, how do you get what you edited in notepad to be updated in your webpage?

I tried saving as HTML however I don't see that option, I only see save as txt.
User avatar
Ron P.
Advisor
Posts: 12002
Joined: Tue May 10, 2005 12:45 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Hewlett-Packard 2AF3 1.0
processor: 3.40 gigahertz Intel Core i7-4770
ram: 16GB
Video Card: NVIDIA GeForce GTX 645
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 4TB
Monitor/Display Make & Model: 1-HP 27" IPS, 1-Sanyo 21" TV/Monitor
Corel programs: VS5,8.9,10-X5,PSP9-X8,CDGS-9,X4,Painter
Location: Kansas, USA

Post by Ron P. »

With Notepad, there is a drop-down menu for Save as Type, that has txt as one (the default) option, and All Files as the second option. Select the All Files, and then just make sure that your name ends with either .htm or .html. For example mywebpage.html
Ron Petersen, Web Board Administrator
mikefoster
Posts: 30
Joined: Wed Feb 08, 2006 4:30 pm
Contact:

Post by mikefoster »

you can use the div tag like this

====================
<html>
<body>
<div align="center">

<img src="your image url here" />

</div>
</body>
</html>
==================

or you can also use the <center> tag - although it is a little outdated

===============
<html>
<body>
<center>

your stuff here...


</center>
</body>
</html>
===============

Download this free HTML editor from here
http://www.coffeecup.com/free-editor/


Good Luck...
Mike Foster
FREE Ulead Video based Tutorials
http://www.seeitdoit.tv
Post Reply