which is better?
| SitePoint Sponsor |
which is better?
Free Science Homework Help
http://www.physicsforums.com
Personally, i recommend css. it gives you far more control and you can get different effects.
:
:





Originally Posted by mancroft
I agree but it also depends on the audence, and what browsers they use (i.e NN 4.x). Also if the data are from a database then tables work much better.
"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
Any ideas why this doesn't work? Don't pay any attention to what the text says. The positioning just doesn't work and the width doesn't make the text into a box.
Code:<style type="text/css"> .right {position:absolute; left=500px; top=200px; width=200px} .left {position:abosolute; left=30px; top=200px; width=200px} .top {position:absolute; left=200; top=20px; width=200px} </style>Code:<!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> <LINK href="test.css" rel="stylesheet" type="text/css"> <title>XHTML and CSS test</title> </head> <body> <div class="left"> The heading is placed 100px down from the top of the document, and 100px to the right from the left side of the document. The paragraph is placed 200px down from the top of the document, and 100px to the right from the left side of the document. </div> <div class="right"> The heading is placed 100px down from the top of the document, and 100px to the right from the left side of the document. The paragraph is placed 200px down from the top of the document, and 100px to the right from the left side of the document. </div> <div class="top"> This is the heading </div> </body> </html>
Free Science Homework Help
http://www.physicsforums.com
If the first section of code is your external stylesheet, you'll need to take out the <style> tags.
Stephen Taylor
Visual Echo Designs: http://www.vischo.com/
Personal: http://people.msoe.edu/~taylors/
Evolt: http://www.evolt.org/user/shifter/54210/index.html
.top {position:absolute; left=200; top=20px; width=200px} should have left:200px; ie no = and px after the number
check all the other css entries for the same errors.
:
:
Your <link> tag should be lowercased in XHTML; actually, all elements and quoted attributes should be lower-cased (well, enumerated sets of attributes with limited values, i.e. input type="text").
Also, chalk up another vote for CSS layout. More flexibility than table-based layouts if you ask me.
How so? If the data needs to be represented in a tabular format then yes, tables will work better. However, if your database record is a block of text, how would a table be a better match than a <p> tag?Originally Posted by Chuckie
goto http://physicspost.com/temp/index.html
for some reason my left div isn't responding to the 200px top position
also is css positioning alot of trial and error, how can I find out the dimensions I need?
Free Science Homework Help
http://www.physicsforums.com
You have a typo. It's "position: absolute;", not "abosolute".
and it should be self-closing, with a slash at the end.Originally Posted by vgarcia
Code:<link href="test.css" rel="stylesheet" type="text/css" />
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
you work out the layout first, doing a rough sketch on paper or in a graphics app, to get all your measurement...Originally Posted by dethfire
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
why doesn't xhtml give me an error when I mess up like that? whats the use of xhtml if it doesn't care if I do something wrong?
Free Science Homework Help
http://www.physicsforums.com
The error was in the CSS, not the XHTML. Also, your CSS did generate an error: namely, your positioning wasn't correct!Originally Posted by dethfire
D'oh! I missed that! Good thing we have eagle-eyes like redux on the forumsOriginally Posted by redux
!
and if you do mess up your xhtml, many browsers will exhibit weird behaviour...mostly going into quirks mode...
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
well, i've got 4 eyes, so that helpsOriginally Posted by vgarcia
![]()
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
Me too, sorta (contact lensesOriginally Posted by redux
).
lol quiks mode? wtf, this seems like poor standards to me if the only way to express an error is to go into quiks mode, my god, loland if you do mess up your xhtml, many browsers will exhibit weird behaviour...mostly going into quirks mode
Free Science Homework Help
http://www.physicsforums.com
Quirks mode is how most table-based layouts are rendered, since the browser doesn't know how else to render non-standard content. If you can't create valid content, why/how can the browser know how to render it? It's a web browser, not a mind readerOriginally Posted by dethfire
.
Thats not what the sales guy told me!!!It's a web browser, not a mind reader![]()
Free Science Homework Help
http://www.physicsforums.com
as a sidenote: the browser's job is to do the best it can to interpret and display a page. it would be a sad world if, every time it hit a page of someone trying to do standards-compliant code, and failing miserably, it would come up with a popup dialog saying "the author had no idea what standards are. proceed anyway ? yes | no | whatever".
the burden is on the page authors to test their creations in the appropriate tools. with the easy availability of online validators, and tools such as tidy http://www.w3.org/People/Raggett/tidy/ , it's really not rocket surgery....
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
is that a flame??it's really not rocket surgery....
Free Science Homework Help
http://www.physicsforums.com
not really, no...my flames are usually quite recognisable as such![]()
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
WaSP Accessibility Task Force Member
splintered.co.uk | photographia.co.uk | redux.deviantart.com
Bookmarks