?
Solved

Spreading div content evenly without using tables

Posted on 2007-10-18
2
Medium Priority
?
1,376 Views
Last Modified: 2011-02-09
Hello,

I want the days of the week to be spread evenly in 125px cells without using tables.

This works in IE6 if I do NOT include a dtd but it does not work in any browser with a valid dtd.  

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Example</title>
<style>
div {
width: 125px;
text-align: center;
display: inline;
}
</style>
</head>
<body>

<div>Monday</div><div>Tuesday</div><div>Wednesday</div><div>Thursday</div><div>Friday</div><div>Saturday</div>

</body>
</html>
0
Comment
Question by:hankknight
2 Comments
 
LVL 8

Accepted Solution

by:
Mikkk earned 2000 total points
ID: 20105726
The official form is:

<STYLE TYPE="text/css">
<!--
div {
width: 125px;
text-align: center;
display: inline;
}
-->
</STYLE>
0
 
LVL 16

Author Comment

by:hankknight
ID: 20107613
Thanks, that might validate better but it does not solve the problem.

Now all the words run togeather.  I want them each in a 125px cell.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question