homepage Welcome to WebmasterWorld Guest from 54.166.14.218
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
CSS in XHTML Basic 1.0
XHTML Basic does not support inline style
mastermind085

10+ Year Member



 
Msg#: 606 posted 11:29 am on Feb 10, 2003 (gmt 0)

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

 

andreasfriedrich

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 606 posted 11:45 am on Feb 10, 2003 (gmt 0)

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

mastermind085

10+ Year Member



 
Msg#: 606 posted 12:11 pm on Feb 10, 2003 (gmt 0)

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

andreasfriedrich

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 606 posted 12:33 pm on Feb 10, 2003 (gmt 0)

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

mastermind085

10+ Year Member



 
Msg#: 606 posted 12:56 pm on Feb 10, 2003 (gmt 0)

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

andreasfriedrich

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 606 posted 1:08 pm on Feb 10, 2003 (gmt 0)

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

Andreas

mastermind085

10+ Year Member



 
Msg#: 606 posted 1:23 pm on Feb 10, 2003 (gmt 0)

sorry, i am back... this doesnt seem to be working in netscape... is it specific to ie?

Nick_W

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



 
Msg#: 606 posted 1:27 pm on Feb 10, 2003 (gmt 0)

Welcome to WebmasterWorld mastermind085

Which version of NS?

Nick

andreasfriedrich

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 606 posted 1:33 pm on Feb 10, 2003 (gmt 0)

It should be working in NS6+.

mastermind085

10+ Year Member



 
Msg#: 606 posted 2:15 pm on Feb 10, 2003 (gmt 0)

just now installed ns 7.0... yup its working... thanx a lot
Vasant

mastermind085

10+ Year Member



 
Msg#: 606 posted 6:13 am on Feb 11, 2003 (gmt 0)

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

mastermind085

10+ Year Member



 
Msg#: 606 posted 7:07 am on Feb 11, 2003 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved