473,804 Members | 4,014 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My text won't align to the right

hgeithus
20 New Member
Hi.

Description of problem: I'm using this CSS-template to build a website: http://www.glish.com/css/7.asp (scroll down at the site to see the full code of the template).

What I did was to create a new CSS element like this:
Expand|Select|Wrap|Line Numbers
  1.     .langbar {
  2.         font-size:12px;
  3.         text-align:right;
  4.         }
I have a language bar like this: "ENG | DE | NO" , and I want it to go in the upper right of the site (in the banner). So I placed the following code inside the banner like this:
Expand|Select|Wrap|Line Numbers
  1. <div id="banner">
  2.     <span class="langbar"><a href="?locale=en_US">ENG</a> |
  3.     <a href="?locale=de_DE">DE</a> |
  4.     <a href="?locale=nb_NO">NO</a></span>
  5.     </div>
The browser respects the "font-size", but it ignores the "text-align", and I think it's because it's all inside a div tag. But how can I align the text the way I want?
I don't want to go back to using tables for layout, because I like the "floatyness " of the CSS layout.

Any advice is very much appreciated :)
Nov 3 '08 #1
4 8219
eWish
971 Recognized Expert Contributor
Give this a shot.

Expand|Select|Wrap|Line Numbers
  1. <div id='banner'>
  2.     <div class='langbar'>
  3.            <a href="?locale=en_US">ENG</a> |
  4.            <a href="?locale=de_DE">DE</a> |
  5.            <a href="?locale=nb_NO">NO</a>
  6.     </div>
  7. </div>

--Kevin
Nov 3 '08 #2
JamieHowarth0
533 Recognized Expert Contributor
Once you've edited your code as per Kevin's suggestion, add this too:

Expand|Select|Wrap|Line Numbers
  1. .langbar {
  2.             font-size:12px;
  3.             text-align:right;
  4.             float:right;
  5.             }
  6.  
Hope it helps!

codegecko
Nov 3 '08 #3
David Laakso
397 Recognized Expert Contributor
I doubt the float is needed but it will not hurt. The validator is gonna love Glish's doctype. And the gentlepeople who still use the world's most popular browsers are gonna love glish's outdated hacks; and, jumping through hoops to scale his frozen mousetye.
Nov 3 '08 #4
hgeithus
20 New Member
Thank you. :)
Worked out nicely.
Nov 29 '08 #5

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

Similar topics

7
6810
by: Phil Powell | last post by:
Code: <!-- script src="/js/val_header.js"></script --> <style> <!-- BODY { scrollbar-3d-light-color:#eeeedd; scrollbar-arrow-color:#000000; scrollbar-base-color:#000000; scrollbar-dark-shadow-color:#eeeedd;
12
95551
by: Ted Mencini | last post by:
When I replaced older <IMG ALIGN=RIGHT ...> tags with a CSS definition <IMG class=right ...> xxx.css: IMG.right { BORDER: 0; align: right } I notice that the effect is NOT the same. While in the past the text was flowing smoothly around the picture on the right side there is now a hard cut: Text, then picture below with white space on the left and finally
8
20039
by: André Hänsel | last post by:
Hi! When I put a table into a table and try to align it right, it works in IE but not in Firefox. Simplest code to reproduce: <html> <body> <table style="width: 100%"> <tr>
1
10985
by: Astra | last post by:
Hi All This has been bugging me for months and I just can't my finger on why it won't work in Safari/FireFox (IE lets me off cos it's nice liek that). In essence, the offending code is as follows: <TD CLASS="NavBarHeaderCellB"> <!-- #include file="../incs/sprocs/fred.asp" --> </TD>
6
1792
by: tshad | last post by:
I have a cell with 2 items in it: a textbox and a link. The link is actually a button (image), but for the example I am using a link, which is doing the same thing. Here is the stripped down version of my page that shows the problem: *********************************************************************************** <html> <head></head>
3
7881
by: Sjef Janssen | last post by:
Is it possible to have a box (div) which sets a background-color and which contains (on the same line) text which is left aligned and text which is right aligned. (as in a table: two td's left one left aligned, right one right aligned). Thanxs!!
4
17627
by: Jason | last post by:
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg" runat=server /> </asp:Label> </td> <td >
4
32024
by: Bjorn Sagbakken | last post by:
With .NET 2.0: Is there a way to right align the text in a textbox? The task is to edit numbers in a table-column, and it looks kind of silly with the numbers left-aligned. A label respond to formatting of the table cell, but text within the texbox doesn't. Bjorn
9
1892
miche002
by: miche002 | last post by:
Heya I am trying to design a simple site. I would do it in css but don't have the time to learn and have spent too much time already trying to learn. The link is my site control U to get the source. Everything is aligned top in dreamweaver but for some reason when previewed/uploaded my tables shift. Thanks for the help. I really appreciate it! This has very frustrating!
0
9710
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
10340
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...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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
7626
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
5527
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
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3830
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.