Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > alignment issue with DIVS

Reply
Thread Tools

alignment issue with DIVS

 
 
Chaprasi
Guest
Posts: n/a
 
      04-21-2006
Gurus in HTML and CSS, I need your help. I have this HTML which has
<DIV>'s columns and I have no idea why the 2nd column which has a drop
down is not aligning proper with the first column which has a text box.

Here is my HTML,

Thanks,
Chaprasi

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>:: DIVS ::</title>
<style type="text/css">
div.container
{
width: 500px;
float: left;
border: blue 1px solid;
}

div.columns
{
float: left;
width: 150px;
}
</style>
</head>
<body>
<div class="container">
<div class="columns">
<input id="Text1" name="Text1" type="text"/>
</div>
<div class="columns">
<select id="Select1" name="Select1">
<option>Item 1</option>
<option>Item 2</option>
</select>
</div>
<div class="columns">
<input id="Text2" name="Text2" type="text" />
</div>
</div>
</body>
</html>

 
Reply With Quote
 
 
 
 
josh
Guest
Posts: n/a
 
      04-21-2006

Chaprasi wrote:
> Gurus in HTML and CSS, I need your help. I have this HTML which has
> <DIV>'s columns and I have no idea why the 2nd column which has a drop
> down is not aligning proper with the first column which has a text box.
>
> Here is my HTML,
>
> Thanks,
> Chaprasi
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>:: DIVS ::</title>
> <style type="text/css">
> div.container
> {
> width: 500px;
> float: left;
> border: blue 1px solid;
> }
>
> div.columns
> {
> float: left;
> width: 150px;
> }
> </style>
> </head>
> <body>
> <div class="container">
> <div class="columns">
> <input id="Text1" name="Text1" type="text"/>
> </div>
> <div class="columns">
> <select id="Select1" name="Select1">
> <option>Item 1</option>
> <option>Item 2</option>
> </select>
> </div>
> <div class="columns">
> <input id="Text2" name="Text2" type="text" />
> </div>
> </div>
> </body>
> </html>


Seems to be aligning fine for me. Maybe I dont know what you mean. You
could post a link to a screenshot or better describe the problem you
are having? (It also is a common courtsey to post a link to a working
page so that the people that you are asking for help from dont have to
do work to help you.)

 
Reply With Quote
 
 
 
 
Chaprasi
Guest
Posts: n/a
 
      04-21-2006
thanks for the reply josh, I am sorry for not providing a site.

I just found out I had to do some padding-top and it works.

I am new to this tableless and using DIV to create a table effect.

thanks anyways

 
Reply With Quote
 
Joe
Guest
Posts: n/a
 
      04-23-2006
In article <(E-Mail Removed) .com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> thanks for the reply josh, I am sorry for not providing a site.
>
> I just found out I had to do some padding-top and it works.
>
> I am new to this tableless and using DIV to create a table effect.
>
> thanks anyways
>
>

ummm, if you need a table, USE a table. Tables are for stuff where a
relationship exists between the columns and rows. (ie, if you can put
meaningful headings in the columns, it's a table.)
Tables are NOT for making your page "look good".
 
Reply With Quote
 
frederick
Guest
Posts: n/a
 
      04-23-2006
Joe wrote:
> ie, if you can put
> meaningful headings in the columns, it's a table.


That's a good way to explain it to someone struggling to get the
distinction! I shall have to remember that way of putting it.


--
AGw.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
swapping divs -- when divs NOT positioned absolutely.. maya Javascript 4 11-16-2007 05:11 PM
Troubling Alignment (I think) issue. Kevin C Programming 12 11-08-2007 09:05 PM
Alignment Issue in I.E. - New to CSS 1995 Cobra HTML 5 09-09-2006 01:01 AM
Managing divs within divs.... rich HTML 0 02-02-2006 07:38 PM
Alignment issue - any tweaks known please? lime HTML 2 02-25-2005 06:48 AM



Advertisments