473,815 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Correctness of code for box with header

In some situations, I'd like to put some content within a box with a header.
No real problem there. But what if I want the header to have something on
the left hand side as well as on the right, and possibly of different sizes?
The code I have included appears to work fine in IE 6.0, Mozilla 1.6, NN
7.1, and Opera 7.23, except that Opera chops off the bottom of the 'g' in
"Right". Padding problem? That's minor though. I'm curious if there's a
better way to accomplish this look. As I have it below, you have to
micromanage the heights to fit whatever is within the header. Furthermore,
if you want to put an image in the header, I think you'd have to specify a
fixed height in 'px' to ensure it fits the image properly. Any and all
comments are welcome.

Code:
<html>
<head><title> A Container</title></head>
<body>
<!-- Start box -->
<div style="width: 250px; border: 2px solid #333399;">
<!-- Start header -->
<div style="color: #ffffff; background-color: #333399; padding: 2px;
height: 2em;">
<div style="float: left; line-height: 2em; vertical-align: center;">
Left
</div>
<div style="float: right; font-size: 200%;">
Right
</div>
<div>
&nbsp;
</div>
</div> <!-- End header -->

<!-- Start body -->
<div>
<p>Some stuff to put in this block.</p>
<p>Could be a lot.</p>
<p>But you never know.</p>
</div> <!-- End body -->

</div> <!-- End box -->
</body>
</html>
Jul 20 '05 #1
0 1459

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

Similar topics

2
2357
by: Jim Strathmeyer | last post by:
I have a weird question about const correctness when using an stl list. I have a wrapper Inventory class that holds a list of pointers to Items. (Yes, they have to be pointers.) Now, obviously the Inventory class isn't going to mutate the Items, so its Add function should be Add(const Item *), and the list should be std::list<const Item *>. One way to access the Inventory's item's is to iterate through them with: std::list<const Item...
7
1642
by: David. E. Goble | last post by:
Hi all; I have the following files; index.html, sigsheader.js, sigsboby.js, smilesbody.js and smiles.js. The sourse is below. The page displays two manual slide shows... Each slideshow has a set of buttons. the top slideshow (the smiles work fine. How ever the sigs slideshow displays the pictures in the smiles section. *************** index.html ***************************** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
12
2424
by: Adrian | last post by:
Could someone please tell me how I can check out the correctness of a site's coding. I have brought about a website, checked it out with various browsers. It seemed to be ok. Then I come across a browser that has problems with my site, and I'd like to find out what I have done wrong. Apologies if this question has been asked a million times before, however I do not have this information and would be grateful if someone could provide me with...
10
2294
by: quantdev2004 | last post by:
Hi all, I have been deling with this kind of code: class Foo { public: void NonConstMethod() {} };
14
2707
by: mandydhaliwal | last post by:
Hi Guys, I was going through a product's source code. They never use const function arguments with default value. for instance Never noticed following type of declaration foo ( const int param1, const bool = false) const;
2
3152
by: Clint Olsen | last post by:
Hello: I posted a thread on comp.programming awhile back asking about an algorithm I implemented on square root. The idea was to use the square root of a prime number as a convenient way to get a pseudorandom number generator. So, rather than calculate the square root to try to get a particular precision answer, you would calculate it to x number of bits. This particular function takes a radicand and the number of iterations as...
1
1650
by: nvitacolonna | last post by:
I have found this page: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1360.htm identifying const-correctness inconsistencies in the input/output standard libraries (e.g., tellg() not being declared const). I was just wondering: what is the current opinion of the standard committee about such issue? Is that going to be taken into account for the new standard? (I admit that I was a bit surprised when I discovered that...
24
2533
by: David | last post by:
Hi list. What strategies do you use to ensure correctness of new code? Specifically, if you've just written 100 new lines of Python code, then: 1) How do you test the new code? 2) How do you ensure that the code will work correctly in the future? Short version:
3
1147
by: =?iso-8859-1?Q?Daniel_Lidstr=F6m?= | last post by:
Hello! I have a strange problem with my pimpl implementation. What happens is that const correctness is not respected. Let me go straight to the code: #include <iostream> struct Geometry {}; class LineData
0
10673
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
10147
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
9227
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
6899
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
5570
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...
0
5712
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4360
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
3889
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3032
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.