• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 08:50
CET 14:50
KST 22:50
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!33$5,000+ WardiTV 2025 Championship6[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Sparkling Tuna Cup - Weekly Open Tournament Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BW General Discussion [BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review
Tourneys
[Megathread] Daily Proleagues [ASL20] Grand Finals [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1397 users

HTML Help

Blogs > Polemos
Post a Reply
1 2 Next All
Polemos
Profile Blog Joined March 2011
United States160 Posts
Last Edited: 2011-08-09 14:56:04
August 09 2011 14:54 GMT
#1
Hi!
Recently, I've been teaching myself HTML and CSS, with a bit of javascript thrown in. Unfortunately, I have run into a block, and I can't seem to find an error with my code (it's really, really simple.) I've looked at it for hours, and I still can't find an error. I was wondering if anyone could help :/ I'll put all the info in a spoiler below.


+ Show Spoiler +

http://dev.ieworks.net/devtest/location_add.html


+ Show Spoiler +


<!DOCTYPE html>
<head>
<title>Pop-Up Location Form</title>
</head>
<body>
<table>
<tr>
<td>Name: <input type="text" id="loc_name" /></td>
</tr>
<tr>
<td >Address 1: <input type="text" id="loc_add_1" /></td>
</tr>
<tr>
<td>Address 2: <input type="text" id="loc_add_2" /></td>
</tr>
<tr>
<td>City:<input type="tex" id="city_add" /></td>
<td>State: <select name="state" />
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select></td>
<td>Zip Code:<input type="Text" id="loc_zip" /></td>
</tr>
<tr>
<td><input type="button" id="button_cancel" value="Cancel" /></td>
<td><input type="button" id="button_save" value="Save" /></td>
</tr>
</table>
</body>
</html>


P.S. I've run it through a code validator to no avail, and I've tried using Firebug, but I can't figure out how to use it ._.

It is better to be hated for who you are then loved for who you are not.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
August 09 2011 14:58 GMT
#2
On August 09 2011 23:54 Polemos wrote:
Hi!
Recently, I've been teaching myself HTML and CSS, with a bit of javascript thrown in. Unfortunately, I have run into a block, and I can't seem to find an error with my code (it's really, really simple.) I've looked at it for hours, and I still can't find an error. I was wondering if anyone could help :/ I'll put all the info in a spoiler below.


+ Show Spoiler +

http://dev.ieworks.net/devtest/location_add.html


+ Show Spoiler +


<!DOCTYPE html>
<head>
<title>Pop-Up Location Form</title>
</head>
<body>
<table>
<tr>
<td>Name: <input type="text" id="loc_name" /></td>
</tr>
<tr>
<td >Address 1: <input type="text" id="loc_add_1" /></td>
</tr>
<tr>
<td>Address 2: <input type="text" id="loc_add_2" /></td>
</tr>
<tr>
<td>City:<input type="tex" id="city_add" /></td>
<td>State: <select name="state" />
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="DC">District of Columbia</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select></td>
<td>Zip Code:<input type="Text" id="loc_zip" /></td>
</tr>
<tr>
<td><input type="button" id="button_cancel" value="Cancel" /></td>
<td><input type="button" id="button_save" value="Save" /></td>
</tr>
</table>
</body>
</html>


P.S. I've run it through a code validator to no avail, and I've tried using Firebug, but I can't figure out how to use it ._.


<select name="state" />

There is your mistake.
Remove the / in the opening select tag.

NihiLStarcraft
Profile Blog Joined January 2010
Denmark1413 Posts
Last Edited: 2011-08-09 14:59:04
August 09 2011 14:58 GMT
#3
It'd probably save time if you let us know what the problem is? :p

EDIT: Ninja'd.
Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 14:59 GMT
#4
I have done so, but it still hasn't done anything with my formatting issues ._.
It is better to be hated for who you are then loved for who you are not.
Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 15:00 GMT
#5
Look at the first spoiler. Since it's in a table, all the text inputs, and name address & w/e should be lining up, but they aren't. My issue is finding out why they aren't lining up.
It is better to be hated for who you are then loved for who you are not.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
Last Edited: 2011-08-09 15:07:49
August 09 2011 15:01 GMT
#6
On August 09 2011 23:59 Polemos wrote:
I have done so, but it still hasn't done anything with my formatting issues ._.


Ok, what are your formatting issues then?
Edit: Now i got Ninjaed.

They are aligning up exactly like you wrote in the code.
The layout is exactly as defined.

However, your table structure is broken in a logical/semantical way, not a syntactical way.

A table has a defined number of rows and columns and should have the same number of columns in every row.
Your first 3 rows only have 1 column (td)

<tr>
->>> <td>Name: <input type="text" id="loc_name" /></td>
</tr>
<tr>
->>> <td >Address 1: <input type="text" id="loc_add_1" /></td>
</tr>
<tr>
->>> <td>Address 2: <input type="text" id="loc_add_2" /></td>
</tr>


Your fourth row has 3

<tr>
->>> <td>City:<input type="tex" id="city_add" /></td>
->>> <td>State: <select name="state">
<option value="AL">Alabama</option>
..snip..
</select></td>
->>> <td>Zip Code:<input type="Text" id="loc_zip" /></td>
</tr>


Your fifth row has 2:


<tr>
->>> <td><input type="button" id="button_cancel" value="Cancel" /></td>
->>> <td><input type="button" id="button_save" value="Save" /></td>
</tr>


You probably want to have the label in a seperate column.
Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 15:02 GMT
#7
Look up one post
It is better to be hated for who you are then loved for who you are not.
Moff
Profile Joined August 2008
United Kingdom166 Posts
August 09 2011 15:07 GMT
#8
http://jsfiddle.net/BjgW4/

Is that what you wanted?

Since you put two <td> inside one <tr> it messed up the formatting.
Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 15:13 GMT
#9
So, if I understand you correctly Morf, I can only have like
<tr>
<td>xxxx</td>
</tr>

and no other TD's in there?
It is better to be hated for who you are then loved for who you are not.
Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 15:13 GMT
#10
Assuming that I want them to be all lined up
It is better to be hated for who you are then loved for who you are not.
lolsixtynine
Profile Blog Joined January 2011
United States600 Posts
Last Edited: 2011-08-09 15:20:58
August 09 2011 15:17 GMT
#11
No, you can have multiple tds in a tr, you just need to have the same number in each or the formatting can get wacky. Normally if you have the same number of td's in each row, it will automatically align them into columns.

Edit for example:

You currently have
<td>Name: <input type="text" id="loc_name" /></td>


You want:

<td>Name: </td> 
<td> <input type="text" id="loc_name" /></td>

Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
August 09 2011 15:19 GMT
#12
On August 10 2011 00:13 Polemos wrote:
So, if I understand you correctly Morf, I can only have like
<tr>
<td>xxxx</td>
</tr>

and no other TD's in there?


You can have as many as you want, you should just always have the same number of <td>s in all <tr>s of the same table.

<tr> starts a new row (table row)
<td> starts a new column (table data)

A table is always a rectangle.
For example, a table 2 cells wide, 5 rows high would be:
(Using dummy content)

<table>
<tr>
<td>Name</td>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td>City</td>
<td><input type="text" name="city" /></td>
</tr>
<tr>
<td>ZIP code</td>
<td><input type="text" name="zip" /></td>
</tr>
<tr>
<td>State</td>
<td><input type="text" name="state" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="save" /></td>
<!-- colspan means, this column should span over 2 columns, it counts double in this case -->
</tr>
</table>

Polemos
Profile Blog Joined March 2011
United States160 Posts
August 09 2011 15:22 GMT
#13
Ahhhhhhhhhhhhhh!! I understand ! Thank you all very much!
It is better to be hated for who you are then loved for who you are not.
Trowabarton756
Profile Blog Joined May 2008
United States870 Posts
August 09 2011 15:45 GMT
#14
Basically bra when i looked at your page it was fine in firefox, but you gotta understand that just because the code works in 1 browser doesn't mean it will work in another(i assume you're looking at this in IE or another browser) so make sure to check it in as many browsers as you can to make sure the code properly works.
http://www.teamliquid.net/video/streams/Trowabarton756
Marou
Profile Blog Joined April 2010
Germany1371 Posts
August 09 2011 16:58 GMT
#15
i wouldn't recomend using tables for your layout, but rather use div and css to have boxes layed out the same way as a table does it. That's just my opinion tho, many people still use tables, but if you are serious about html/css you shouldn't rely on them to much.
twitter@RickyMarou
aike
Profile Blog Joined July 2010
United States1629 Posts
Last Edited: 2011-08-09 17:35:25
August 09 2011 17:34 GMT
#16
On August 10 2011 01:58 Marou wrote:
i wouldn't recomend using tables for your layout, but rather use div and css to have boxes layed out the same way as a table does it. That's just my opinion tho, many people still use tables, but if you are serious about html/css you shouldn't rely on them to much.


This exactly. Tables are supposed to be for tabular data. Like say you want to display the results of all info that has ever been submitted with the current from, you'd want it to be laid out like a spreadsheet. But for actual page formatting you should use CSS + Divs and other HTML elements. With CSS you can position things anywhere you want on the page, you aren't stuck with the constraints of a table.

And to Trowabarton756, that isn't completely true. These days as long as you are using proper CSS and HTML your pages should look the same in all browsers. I haven't had any issues with different stuff in different browsers in a long time.
Wahaha
KeksX
Profile Blog Joined November 2010
Germany3634 Posts
Last Edited: 2011-08-09 18:03:36
August 09 2011 17:59 GMT
#17
On August 10 2011 00:19 Morfildur wrote:
Show nested quote +
On August 10 2011 00:13 Polemos wrote:
So, if I understand you correctly Morf, I can only have like
<tr>
<td>xxxx</td>
</tr>

and no other TD's in there?


You can have as many as you want, you should just always have the same number of <td>s in all <tr>s of the same table.


Not (100%) true, you can just use colspans !
Integra
Profile Blog Joined January 2008
Sweden5626 Posts
August 09 2011 18:08 GMT
#18
I just read your code, why are you using CSS when you clearly aren't using it? Your form should not be formatted through tables, since you are using CSS. Just setup the form using the List tag and then format it with CSS.
"Dark Pleasure" | | I survived the Locust war of May 3, 2014
SarR
Profile Joined June 2011
476 Posts
Last Edited: 2011-08-09 18:19:17
August 09 2011 18:16 GMT
#19
I strongly recommend that you do not use tables to arrange HTML elements. It could get real ugly for you should you decide to make changes later. Tables are so 1995

Use CSS instead to arrange your elements. Id even go so far as to say that tables are unnecessary in this age. CSS is the way you should be going.

Edit:
Could you provide a screenshot of what you expect your HTML form to look like and id make some time to to recreate it using CSS as an example for you.
KeksX
Profile Blog Joined November 2010
Germany3634 Posts
August 09 2011 18:20 GMT
#20
On August 10 2011 03:16 SarR wrote:
I strongly recommend that you do not use tables to arrange HTML elements. It could get real ugly for you should you decide to make changes later. Tables are so 1995

Use CSS instead to arrange your elements. Id even go so far as to say that tables are unnecessary in this age. CSS is the way you should be going.

Edit:
Could you provide a screenshot of what you expect your HTML form to look like and id make some time to to recreate it using CSS as an example for you.


"to break a butterfly on a wheel"

He needs a table. He makes a table. :3
1 2 Next All
Please log in or register to reply.
Live Events Refresh
CranKy Ducklings
10:00
Sea Duckling Open #140
CranKy Ducklings79
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 171
Railgan 42
Creator 16
StarCraft: Brood War
Sea 6948
Horang2 4036
GuemChi 1616
Jaedong 953
actioN 295
Mini 258
Killer 246
Soma 234
BeSt 222
Rush 191
[ Show more ]
EffOrt 170
Hyun 86
Mind 81
ToSsGirL 73
Bonyth 70
Backho 59
sas.Sziky 27
JYJ27
PianO 26
zelot 18
Terrorterran 14
soO 11
sorry 9
Sacsri 8
HiyA 8
Aegong 2
Dota 2
Gorgc6481
singsing2210
qojqva1772
Dendi556
XcaliburYe194
BananaSlamJamma90
Heroes of the Storm
Khaldor209
Other Games
B2W.Neo1194
Lowko261
Sick244
Fuzer 193
Hui .112
XaKoH 75
nookyyy 64
MindelVK19
Organizations
StarCraft 2
WardiTV705
Counter-Strike
PGL236
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• StrangeGG 68
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1890
League of Legends
• Stunt703
• HappyZerGling113
Upcoming Events
IPSL
4h 10m
dxtr13 vs OldBoy
Napoleon vs Doodle
LAN Event
4h 10m
Lambo vs Clem
Scarlett vs TriGGeR
ByuN vs TBD
Zoun vs TBD
BSL 21
6h 10m
Gosudark vs Kyrie
Gypsy vs OyAji
UltrA vs Radley
Dandy vs Ptak
Replay Cast
9h 10m
Sparkling Tuna Cup
20h 10m
WardiTV Korean Royale
22h 10m
LAN Event
1d 1h
IPSL
1d 4h
JDConan vs WIZARD
WolFix vs Cross
BSL 21
1d 6h
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
1d 19h
[ Show More ]
Wardi Open
1d 22h
WardiTV Korean Royale
2 days
Replay Cast
3 days
Kung Fu Cup
3 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
4 days
The PondCast
4 days
RSL Revival
4 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
RSL Revival
5 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
5 days
CranKy Ducklings
6 days
RSL Revival
6 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.