![]() | | ||||||||
| | #1 |
| Active Warrior War Room Member Join Date: Aug 2009
Posts: 56
Thanks: 21
Thanked 4 Times in 3 Posts
|
I offically hate tables... And even more so in XHTML ![]() I can't get these bad boys centered... Code is currently -- ************************************************** <table width="600" height="200" border="0" style="border:dashed" bordercolor="#000000" align="center"> <tr> <td height="188"> </td> </tr> </table> ************************************************** I even tried adding <div align="center"></div> Tags... Nothing. Strangely enough -- In IE everything is centered, but there is no border. But in every other browser -- FF, Chrome etc -- there is a border but it is left aligned. I am so confused right now as to how I can be having such different results... If anyone can help I would be EXTREMELY grateful ![]() JR |
| | |
| | #2 |
| HyperActive Warrior War Room Member Join Date: Sep 2009 Location: Canada
Posts: 137
Thanks: 4
Thanked 35 Times in 18 Posts
|
use div's is better. like this: Style Sheet Class: Code: #centeredDiv {
width: 600px;
height: 188px;
text-align:center;
margin: auto;
border: 1px dashed black;
} Code: <div id="centeredDiv">test content</div> |
| VisualWebEffects- Web Application Development, PC Software Development and Identity Design services
| |
| | |
| | #3 |
| Active Warrior War Room Member Join Date: Aug 2009
Posts: 56
Thanks: 21
Thanked 4 Times in 3 Posts
|
Awesome thanks -- Validator doesn't want me using div's at all. Perhaps thats just inline... That top code is for external CSS use I presume? Sorry - started learning HTML/XHTML yesterday ![]() Thanks for the help |
| | |
| | #4 |
| HyperActive Warrior War Room Member Join Date: Sep 2009 Location: Canada
Posts: 137
Thanks: 4
Thanked 35 Times in 18 Posts
|
you can put the css in between the <head> and </head> tags like so: Code: <style type="text/css">
#centeredDiv {
width: 600px;
height: 188px;
text-align:center;
margin: auto;
border: 1px dashed black;
}
</style> <link href="styles.css" rel="stylesheet" type="text/css" /> inside the styles.css you would have: Code: @charset "utf-8";
#centeredDiv {
width: 600px;
height: 188px;
text-align:center;
margin: auto;
border: 1px dashed black;
} |
| VisualWebEffects- Web Application Development, PC Software Development and Identity Design services
| |
| | |
| | #5 |
| Active Warrior War Room Member Join Date: Aug 2009
Posts: 56
Thanks: 21
Thanked 4 Times in 3 Posts
|
So why do I get from Validator "document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag" ?? It doesn't like <div> tags? I have never had that problem before, with HTML - is it an XHTML thing? Side note -- what code is best for aligning images? I am using <img align ="center"> Which works on every browser except IE.. What would work in IE? EDIT: I didn't put in the URL because I am stupid :P But it seems to extend throughout the document -- so I thought it just might have been that you can not use <div> in XHTML or something. Obviously not ![]() URL -- www.thetwittertrade.com I am just spinning because I am getting so many different results from browsers that it is hard to know what I am doing wrong and hard to know what is right. One browser will have a problem - so I will change it and it will be fixed but, fixing it will cause a problem on another broswer. Anyway -- the code is messy as all hell atm and I am sorry for that ![]() Thanks ![]() JR |
| | |
| | #6 |
| Senior Warrior Member War Room Member Join Date: Jul 2008 Location: Niagara Region, Canada
Posts: 1,113
Thanks: 1,476
Thanked 412 Times in 322 Posts
|
post a URL..without looking at the code, we can only guess..if we see the code we can answer correctly
|
| | |
| | |
| | #7 |
| Active Warrior War Room Member Join Date: Aug 2009
Posts: 56
Thanks: 21
Thanked 4 Times in 3 Posts
|
Updated... Thanks Karen |
| | |
| | #8 |
| HyperActive Warrior War Room Member Join Date: Sep 2009 Location: Canada
Posts: 137
Thanks: 4
Thanked 35 Times in 18 Posts
|
i took a quick look at the url in your previous post. And i do me quick, and the one thing that hit me about the html is the fact that your using inline style sheets on about 95% of all your html elements. While inline styles are still supported, it is better design to put them in an external style sheet file (IE: styles.css). Then implement them using the class (IE .mystyle) or ID methods (IE: #mystyle). This way you can reduce your HTML Code overhead by combining styles that our the exact same. |
| VisualWebEffects- Web Application Development, PC Software Development and Identity Design services
| |
| | |
| | #9 |
| Active Warrior War Room Member Join Date: Aug 2009
Posts: 56
Thanks: 21
Thanked 4 Times in 3 Posts
|
I did actually start doing that today ![]() Your code which you gave me in the first post inspired me to start doing it... Which BTW worked AWESOME ![]() Thank you very much -- I have fixed most of the problems now, just need to change a couple more inline styles to external. Thanks again VisualWebEffects -- really appreciate it |
| | |
| | #10 |
| HyperActive Warrior War Room Member Join Date: Sep 2009 Location: Canada
Posts: 137
Thanks: 4
Thanked 35 Times in 18 Posts
|
no problem. glad i could be of assistance |
| VisualWebEffects- Web Application Development, PC Software Development and Identity Design services
| |
| | |
![]() |
|
| Tags |
| tables, xhtml |
| Thread Tools | |
| |
![]() |