473,573 Members | 3,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get text to center

Hi,

I am trying to create a simple two column layout, with a heading centred in the
right column. I don't want to specify the size of the right column, but I am
limiting the left column to 200 pixels in width.

Is this possible?

Thanks for any help.
--
Ben Thomas
Jul 20 '05 #1
30 2403
BenOne© <no**@m.thanks. mate> wrote:
I am trying to create a simple two column layout, with a heading centred in the
right column. I don't want to specify the size of the right column, but I am
limiting the left column to 200 pixels in width.

Is this possible?


CSS table (not supported by IE).

--
Spartanicus
Jul 20 '05 #2
BenOne© <no**@m.thanks. mate> wrote:
I am trying to create a simple two column layout, with a heading centred in the
right column. I don't want to specify the size of the right column, but I am
limiting the left column to 200 pixels in width.

Is this possible?


CSS table (not supported by IE).

--
Spartanicus
Jul 20 '05 #3
On Tue, 13 Apr 2004 23:15:10 GMT, BenOne© <no**@m.thanks. mate> wrote:
Hi,

I am trying to create a simple two column layout, with a heading centred in the
right column. I don't want to specify the size of the right column, but I am
limiting the left column to 200 pixels in width.

Is this possible?

Thanks for any help.


Is there any reason for not using <center><h2> header </h2></center> ? Urological?

.... i meant "theo"

Mason C
Jul 20 '05 #4
On Tue, 13 Apr 2004 23:15:10 GMT, BenOne© <no**@m.thanks. mate> wrote:
Hi,

I am trying to create a simple two column layout, with a heading centred in the
right column. I don't want to specify the size of the right column, but I am
limiting the left column to 200 pixels in width.

Is this possible?

Thanks for any help.


Is there any reason for not using <center><h2> header </h2></center> ? Urological?

.... i meant "theo"

Mason C
Jul 20 '05 #5
BenOne© wrote:
I am trying to create a simple two column layout, with a heading centred
in the right column. I don't want to specify the size of the right column,
but I am limiting the left column to 200 pixels in width.


#sidebar {
width: 200px;
position: absolute; top: 0; left: 0;
}

#content {
margin-left: 200px;
}

#content h1 { text-align: center; }

(Most margins and padding have not been accounted for, the above will cause
overlaps, however it does show a technique that should work)

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Jul 20 '05 #6
BenOne© wrote:
I am trying to create a simple two column layout, with a heading centred
in the right column. I don't want to specify the size of the right column,
but I am limiting the left column to 200 pixels in width.


#sidebar {
width: 200px;
position: absolute; top: 0; left: 0;
}

#content {
margin-left: 200px;
}

#content h1 { text-align: center; }

(Most margins and padding have not been accounted for, the above will cause
overlaps, however it does show a technique that should work)

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Jul 20 '05 #7
On Wed, 14 Apr 2004 05:35:20 GMT, MasonC <ma****@ix.netc om.xyz.com> wrote:

Is there any reason for not using <center><h2> header </h2></center> ?


<center> is deprecated so you'd have to use transitional markup. The above
is exactly equivalent to <h2 align=center>he ader</h2> but again the align
attribute is deprecated.

There's currently no valid way to center in HTML strict unless you use CSS.
Jul 20 '05 #8
On Wed, 14 Apr 2004 05:35:20 GMT, MasonC <ma****@ix.netc om.xyz.com> wrote:

Is there any reason for not using <center><h2> header </h2></center> ?


<center> is deprecated so you'd have to use transitional markup. The above
is exactly equivalent to <h2 align=center>he ader</h2> but again the align
attribute is deprecated.

There's currently no valid way to center in HTML strict unless you use CSS.
Jul 20 '05 #9
/BenOne©/:
I am trying to create a simple two column layout, with a heading centred
in the right column. I don't want to specify the size of the right
column, but I am limiting the left column to 200 pixels in width.


Since you're going to put text content in the left column (most
probably) it is wiser to choose 'em' units to specify its width. You
may calculate the 'em' value while you divide 200px on the
calculated pixel font-size you got for that element.

--
Stanimir
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1707
by: Anna K. | last post by:
Hi Experts, I'm new to JavaScript and web-based apps development, so I'll tell you right off that I don't really know my way around it as of yet. I'm trying to create a code library set with JavaScript (in DreamweaverMX) to display "buttons" with which to select pages in a gallery. I'm trying to "grey out" (and disable) the button for the...
13
2345
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if (document.getElementById"].value=='1') { confirm('Are you sure you want to delete this file?'); } } ......
21
3477
by: MLH | last post by:
A97 procedure to open http://www.arch.com/message/ enter an 800 number, press "Continue", enter a text msg string from a memo field and press "Send" This is a calendaring and appointment A97 database for an attorney's office. I'm sure it must be do-able. I know better than to mention the term "S__dK__ys" in conjunction with this topic....
9
3323
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be visible to a client using a browser. My question is...can a knowledgeable browser user view Jscript source code in an asp file?
5
1991
by: Novice Computer User | last post by:
Hi. Can somebody PLEASE help. Here is a .php script. Right now, the minimum amount of time (i.e. duration) allowed is 1 month. However, I want to be able to reduce the minimum amount of time to 2 days (i.e. 48 hours). Can somebody PLEASE PLEASE tell me what I need to change in this file to do this? Here is a copy - thanks enormously in...
6
4856
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
0
2856
by: chandrasekhar | last post by:
Hi I have developed a web page with some controls. I put all of them in session variables. I passed this values in the page. When an user enter some data in form fields and click the buttton , these values are displaying in next page.after displaying in next page, when click back button to see my entered values for change , no values are in...
4
1845
elen
by: elen | last post by:
hi! I wish for your help! I have a form and i want to store the results to my database and show me back what i sent to database,but my php script won't work.Can somebody help me ?I'm new in php This is my html code for a form: <html> <head> <title>ΦΟΡΜΑ ΣΤΟΙΧΕΙΩΝ ΤΑΥΤΟΤΗΤΑΣ ΑΣΘΕΝΟΥΣ</title> </head> <body bgcolor='fffaaa'>
2
2063
by: everly | last post by:
Hi, I'm helping my friends band and making their MySpace. I messed something up and I can't figure out what it is. Everything is all out of whack on the bottom half of the page. The comments shouldn't be on the left hand side. Help please! Thanks. ____________________________________________________- <style type="text/css"> { Background...
8
2666
lifeisgreat20009
by: lifeisgreat20009 | last post by:
What might be the possible cause ? I have created a website using struts framework, jsp In my transaction page the money is not getting transferred.. When I hit the submit button in my Transaction.jsp page , no transaction happens .. Only the url changes from http://localhost:8080/bankfinalproject/jsp/transaction.jsp to this
0
7777
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7686
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8061
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6411
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5584
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5289
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3730
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1297
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.