473,385 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to align a block XHTML text

55
I have been struggling to align a block text in XHTML.

Terms&Conditions_alignment.jpg

Please see the attached picture designed in MS Word, but how would you could this in XHTML??

Note: I have used labels with width specifications to create the exact distance I require i.e. from "Terms and Conditions:" to the left justified text opposite it.

Regards
Gary Wilson
Apr 25 '10 #1
6 2070
drhowarddrfine
7,435 Expert 4TB
A number of ways. This will work. Adjust margin/padding as needed:
Expand|Select|Wrap|Line Numbers
  1. <p style="width:300px">Term and conditions:
  2. <span>Accept:<input type="checkbox" /></span>
  3. <br />
  4. <span style="float:right;width:200px;">I am the rightful owner</span>
  5. </p>
  6.  
Apr 25 '10 #2
neogazz
55
Thanks your ideas seem to work, however I used the following code:

Expand|Select|Wrap|Line Numbers
  1. <p class="terms"><label for="terms">Terms of use<span class="star">*</span>:</label>
  2. <span class="terms_conditions">I am the rightful owner of this business. Clickazone.com reserves the right to remove or change any business information on this website</span>
  3. <br /><br /><br /><br /><br /><br />
  4. <label for="accept">&nbsp;</label>Accept terms&nbsp;&nbsp;<input type="checkbox" name="Terms"/>
  5. </p>
Apr 25 '10 #3
drhowarddrfine
7,435 Expert 4TB
Use margins and padding for that instead of breaks and spaces.
Apr 25 '10 #4
neogazz
55
@drhowarddrfine
Thanks for the reply. Where would I place the padding and margin attributes, would this be in the <p> container style attributes or in the <span> attributes?

Regards
Gary Wilson
Apr 25 '10 #5
drhowarddrfine
7,435 Expert 4TB
The spans specifically but there may be other areas it could be used.
Apr 25 '10 #6
neogazz
55
Thanks! Your help has been great.
Apr 26 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mikko Rantalainen | last post by:
See example at <URL:http://www.cc.jyu.fi/~mira/moz/formtest.php>. The problem is that the label of submit button is always centered on the button regardsless of 'text-align' property in CSS....
7
by: Robert Nicholson | last post by:
So I've got one page where I have an image inside a DIV with text-align: center and the image is correctly centered in that block. Making me think that text-align will center the contents of a...
10
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274"...
0
by: smr78 | last post by:
Hi, Up to now, I didn't find a solution to align text in the middle of a inline neither block box in the vertical direction. That's because the vertical-align property is not active for many...
11
by: Ben Amada | last post by:
Hello, When centering a block of HTML, in the past, I've always used: <div align="center"> ... </div> However, in VS 2005, I get the following warning: "Validation (XHTML 1.0...
2
by: Mark Rae | last post by:
Hi, I've been asked to "update" an existing fairly simple website to make it XHTML-compliant i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
3
by: torbs | last post by:
Strange behaviour in ie7. A collegue of mine put several images into a page using JCE in Joomla. JCE have the option to align these images and he left aligned every single one - to create a...
2
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at...
6
shane3341436
by: shane3341436 | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta...
40
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.