473,807 Members | 2,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to align a block XHTML text

55 New Member
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 2083
drhowarddrfine
7,435 Recognized Expert Expert
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 New Member
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 Recognized Expert Expert
Use margins and padding for that instead of breaks and spaces.
Apr 25 '10 #4
neogazz
55 New Member
@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 Recognized Expert Expert
The spans specifically but there may be other areas it could be used.
Apr 25 '10 #6
neogazz
55 New Member
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
10460
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. Considering that I can style everything else, this must be a bug, right? Any suggestions how to fix the issue with Mozilla 1.4? How about other versions of Mozilla? How about other browsers? (I'm aware that some people think that one should never...
7
3265
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 block. Another page I have a series of thumbnails which are themselves a DIV block wrapping both an image and a caption (float: left) inside a DIV block with a fixed width which is smaller than the width of the browser and that DIV block is in...
10
66063
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" height="29" alt="Wir schreiben die Geschichte Ihres Unternehmens."></div>
0
22663
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 boxes. And when it is, not all the browsers folow it. I think there is a general solution in surrounding the box with another box, using the top property and fixing the top position at the middle of the surrounding box minus the half height of the box...
11
25392
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 Transitional): Attribute 'align' is considered outdated. A newer construct is recommended."
2
15498
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > ... </html>
3
4813
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 string of images. In Firefox these img-elements breaked when then reached the border of the sorrounding div-element, i ie7 they continued. I removed the align- attribute and everything looking the same in both browsers. I haven't tested in ie6.
2
2492
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 the bottom of the page. Please reply....
6
3559
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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form name="f1"> <table width="1123">
40
5509
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: http://htmlhelp.com/reference/css/text/vertical-align.html
0
9720
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10626
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10372
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10112
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.