Welcome to WebmasterWorld Guest from 23.20.238.193

Forum Moderators: not2easy

Message Too Old, No Replies

CSS in XHTML Basic 1.0

XHTML Basic does not support inline style

     
11:29 am on Feb 10, 2003 (gmt 0)

10+ Year Member



Hi guyz
i have been developing this web page that should be running on mobiles, pagers etc... so i am using XHTML Basic 1.0 which does not support the style element (although i am able to use external style sheets). Now can any1 help me as to how to format a table (say center it) using external style sheets.
thanx a lot
regards
Vasant
11:45 am on Feb 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] Vasant.

Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.

mastermind085 [webmasterworld.com] wrote at 11:29 on Feb. 10, 2003 in message #1 [webmasterworld.com]

XHTML Basic 1.0 which does not support the style element

The style element is supported in XHTML 1.0. See the elementīs definition [w3.org].

To center a table set its right and left margin to auto.

Andreas

12:11 pm on Feb 10, 2003 (gmt 0)

10+ Year Member



if you refer to the XHTML Basic 1.0 spec at
[w3.org...]
it says that the style element is not supported. moreover the following is not working
<table style="margin-left:auto; margin-right:auto;">
if u were referring to something else, please elaborate
thanx
Vasant
12:33 pm on Feb 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I didnīt realize you were talking about the modularized XHTML version. I should read posts more carefully.

To use the style element you need to use the Style element [w3.org] module.

To use the style element you need to use the Style attribute [w3.org] module.

Those links explain about centering in CSS [w3.org]

[bluerobot.com...]
[bluerobot.com...]

HTH Andreas

12:56 pm on Feb 10, 2003 (gmt 0)

10+ Year Member



thanx million times! its working... i posted this message on quite a few forums... none replied... am happy that this is very active
ciao
Vasant
1:08 pm on Feb 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



WebmasterWorld is very helpful indeed. Glad you got it sorted out.

Andreas

1:23 pm on Feb 10, 2003 (gmt 0)

10+ Year Member



sorry, i am back... this doesnt seem to be working in netscape... is it specific to ie?
1:27 pm on Feb 10, 2003 (gmt 0)

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld mastermind085

Which version of NS?

Nick

1:33 pm on Feb 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It should be working in NS6+.
2:15 pm on Feb 10, 2003 (gmt 0)

10+ Year Member



just now installed ns 7.0... yup its working... thanx a lot
Vasant
6:13 am on Feb 11, 2003 (gmt 0)

10+ Year Member



hi there
the following works perfectly fine in ie, whereas the tables are not aligned in ns 7.0 however the texts r aligned. could u please fix the problem
-----------------------------------------------------------
Camera_Auto[1].html

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//Extender//DTD XHTML-Extensions 1.0//EN"
"C:/..../extend.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Camera Control</title>

<style type="text/css">
body {
margin:50px 0px; padding:0px;
text-align:center;
}

#Content {
width:500px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}

</style>
</head>
<body>
<h1>
Canon UPnP Basic Device</h1>
<p />
<p />
<table>
<tr> <th>
<a href="/home/http/VCR.html">
<img src="home/vasanth/jpeg/VcrButton.jpg">
</img>
</a>
</th>
<th>
<a href="/cgi-bin/Camera/ViewThumb?index=1">
<img src="home/vasanth/jpeg/CardButton.jpg">
</img>
</a>
</th></tr>
</table>
<br />
<br />
<br />
<h2>
CAMERA Control</h2>
<br />
<br />
<h3>
Auto Focus</h3>
<br />
<table>
<tr> <th>
<a href="/cgi-bin/Camera/AutoFocusLess">
<img src="home/vasanth/jpeg/Prev.jpg">
</img>
</a>
</th>
<th>
<a href="/cgi-bin/Camera/AutoFocusMore">
<img src="home/vasanth/jpeg/Next.jpg">
</img>
</a>
</th>
</tr>
</table>
<br />
<br />

<table>
<tr> <th>
<a href="/cgi-bin/Camera/ManualFocus">
<img src="home/vasanth/jpeg/Manual.jpg">
</img>
</a>
</th>
</tr> </table>
<br />
<br />
<br />

<table>
<tr> <th>
<a href="/cgi-bin/Camera/AutoRewind">
<img src="home/vasanth/jpeg/Rewind.jpg">
</img>
</a>
</th>
<th>
<a href="/cgi-bin/Camera/AutoWait">
<img src="home/vasanth/jpeg/W.jpg">
</img>
</a>
</th>
<th>
<a href="/cgi-bin/Camera/AutoTune">
<img src="home/vasanth/jpeg/T.jpg">
</img>
</a>
</th>
<th>
<a href="/cgi-bin/Camera/AutoFFwd">
<img src="home/vasanth/jpeg/FFwd.jpg">
</img>
</a>
</th>
</tr></table>
</body>
</html>
-----------------------------------------------------------

extend.dtd

<!ENTITY % style.element "INCLUDE" >
<![%style.element;[
<!ENTITY % style.content "( #PCDATA )" >
<!ENTITY % style.qname "style" >
<!ELEMENT %style.qname; %style.content; >
<!-- end of style.element -->]]>

<!ENTITY % style.attlist "INCLUDE" >
<![%style.attlist;[
<!ATTLIST %style.qname;
%XHTML.xmlns.attrib;
%title.attrib;
%I18n.attrib;
type %ContentType.datatype; #REQUIRED
media %MediaDesc.datatype; #IMPLIED
xml:space ( preserve ) #FIXED 'preserve'
>
<!-- end of style.attlist -->]]>

<!ENTITY % style.attrib
"style CDATA #IMPLIED"
>

<!ENTITY % Core.extra.attrib
"%style.attrib;"
>

<!ENTITY % xhtml-basic10.dtd PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
[w3.org...] %xhtml-basic10.dtd;
-----------------------------------------------------------

please help me out at the earliest.
thanx
Vasant

7:07 am on Feb 11, 2003 (gmt 0)

10+ Year Member



sorry
found out the solution. the given code was a work around for ie alone. for ns we can use the style attribute to set the left and right margin to auto.
its done now
thanx for the help
regards
Vasant
 

Featured Threads

Hot Threads This Week

Hot Threads This Month