473,671 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Table within a <div>

Hi,

i've placed a table within a <div> to dispay some data.
All is well in FF, but in MSIE the table starts inline with the bottom of
the <div> to the left. I've set the css div to vertical align: top, but this
hasn't made a differance.

http://www.paulwatt.info/test/calendar.htm

Thanks guys
--

Paul Watt
http://www.paulwatt.info
Apr 10 '06 #1
61 9808

Have you tried experimenting with CSS "margin" and "padding" also?

As these aren't always treated consistently across browsers.

Apr 10 '06 #2

<mi**@youell.ne t> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...

Have you tried experimenting with CSS "margin" and "padding" also?

As these aren't always treated consistently across browsers.


Sorted now, thanks. used negetive margins and the underscore hack in the
end.
Apr 10 '06 #3
Paul Watt wrote:

used negetive margins and the underscore hack in the end.


Sounds very much like you are treating the symptoms, not the problem.
That is surely the wrong way to go about it.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Apr 10 '06 #4

"kchayka" <us****@c-net.us> wrote in message
news:49******** ****@individual .net...
Paul Watt wrote:

used negetive margins and the underscore hack in the end.


Sounds very much like you are treating the symptoms, not the problem.
That is surely the wrong way to go about it.


What would you suggest?
Apr 10 '06 #5
"Paul Watt" <pa**********@w attio.freeserve .co.uk> wrote:

"kchayka" <us****@c-net.us> wrote in message
news:49******** ****@individual .net...
Paul Watt wrote:

used negetive margins and the underscore hack in the end.


Sounds very much like you are treating the symptoms, not the problem.
That is surely the wrong way to go about it.


What would you suggest?


If it's an IE only issue (make sure that it really is) then you don't use
hacks, you use "conditiona l comments":

<http://virtuelvis.com/archives/2004/02/css-ie-only>

Hacks are ugly.

--
John

Net::Google and Perl: http://johnbokma.com/perl/net-google.html
Apr 10 '06 #6
Paul Watt wrote:

i've placed a table within a <div> to dispay some data.
All is well in FF, but in MSIE the table starts inline with the bottom of
the <div> to the left. I've set the css div to vertical align: top, but this
hasn't made a differance.

http://www.paulwatt.info/test/calendar.htm

IE does not always correctly flow blocks. I'm a little vague on the
specifics but IIRC it miscalculates the available horizontal space
thinking there is not enough for, say, a table whose width is 100%.
A couple of things to try:
1. Float the .content div
2. Set the table's width to less than 100%, or do not use a width at all

BTW "vertical-align: top" is meaningless for a div.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Apr 10 '06 #7
In article <Xn************ *************@1 30.133.1.4>,
John Bokma <jo**@castleamb er.com> wrote:
If it's an IE only issue (make sure that it really is) then you don't use
hacks, you use "conditiona l comments":

<http://virtuelvis.com/archives/2004/02/css-ie-only>

Hacks are ugly.


Well, maybe it is a matter of taste... on reflection, are hacks
per se ugly, and does it matter? What matters objectively is that
something relatively simple works, that it is not going to be a
nuisance later. This latter possibility is a serious one.

Ugly is in the eye of the beholder on this one, I don't find them
that ugly, they have been cleverly found and work and I am
reminded of this when I see them and I look on admiringly. They
are simpler in many ways than making separate style sheets just
for this IE or that IE and IE in common.

I am not advocating them here. I just think it is a bit precious
to refrain from fighting something ugly (IE rendering standards)
in too prim and proper a manner. There is an argument here that
the remedy rather nicely fits the cause.

And really, when push comes to shove, they are broadly
conditional defences against specific nuisances.

--
dorayme
Apr 10 '06 #8
dorayme <do************ @optusnet.com.a u> wrote:
In article <Xn************ *************@1 30.133.1.4>,
John Bokma <jo**@castleamb er.com> wrote:


[..]
Hacks are ugly.


Well, maybe it is a matter of taste...


No it isn't. If you can do the same thing with a conditional comment, do
it with a conditional comment.

--
John Experienced (web) developer: http://castleamber.com/

Textpad quick reference card (pdf): http://johnbokma.com/textpad/
Apr 10 '06 #9
In article <Xn************ *************@1 30.133.1.4>,
John Bokma <jo**@castleamb er.com> wrote:
dorayme <do************ @optusnet.com.a u> wrote:
In article <Xn************ *************@1 30.133.1.4>,
John Bokma <jo**@castleamb er.com> wrote:


[..]
Hacks are ugly.


Well, maybe it is a matter of taste...


No it isn't.


Yes it is.

--
dorayme
Apr 10 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
23981
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable <div> Hide/Show work but not the divRow version? What I'm trying to do here is simultaneously hide 1 or more rows (possibly with nested divs as well). This would allow for an elegant an well performing base for an html base treetable (but I guess...
61
24465
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will 'stretch'</td> <td valign="top" width="300">some data that won't 'stetch'</td> </tr> </table>
7
16995
by: Herbman | last post by:
Hi, I'm trying to position a <tr> ("row") element with CSS. The table itself is positioned with <div> tags. The problem is when I use <div> tags to position the rows within the table nothing happens. In the following example, I want to position two table rows relative to the table itself. Can anyone tell me what I am doing wrong? Please provide sample code.
2
7571
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%" cellspacing="1">
3
3806
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644" onclick="__doPostBack('SitesRadioButtonList_3','')" language="javascript" />
7
3617
by: pamelafluente | last post by:
The precious input given by Laurent, Martin, Benjamin about XMLHttpRequest in Javascript, has made me think that perhaps I could improve what I am currently doing by using Ajax. Let's make it simple and schematic, to see if there is a simple Ajax answer to this. A. I have an HTML page which has some pure html/css code representing a GRID of cell. The page may also contain other objects (images, etc). B. On the server I have a windows...
2
2959
by: Nikolai Onken | last post by:
Hey, I am trying to learn the exact behavior of CSS and was just placing a couple of <div>'s after each other. Each of the <divhas a <pwithin and some text within the <p> Now when I add a background-color to the div, the color won't fill up the entire space I believe it should. The div only has color around the text though it has one line space to the above element. I hope it is clear what I mean:
13
2256
by: Mark | last post by:
Dear folks, In Javascript, is it possible to get all id names within, say, a <div></divpair? Like the array of "document.images", I mean. The reason I ask, is that I have a calender whose <td></tdtable elements, within a given <div></div>, all have a class type, one of which is "today" (to highlight it). Once the calender is drawn, the Javascript has ended. And since Javascript has no known (to me) method of storing variables in say,...
5
13486
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as semantically meaningless containers for bunch's of other elements - like everyone keeps telling me to make my code standards compliant. This request is not because I want a fix, but because I want to
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8819
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4221
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1801
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.