473,785 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

? Specifying TOP, BOTTOM, LEFT, and RIGHT to set size

Hi,

Is it possible to create a colored box like this? :

<html>
<head>
<style type="text/css">
#bbb {
background: #f00;
position: absolute;
top: 10px;
left: 50px;
bottom: 100px;
right: 300px
}
</style>
</head>

<body>
<div id="bbb"></div>
</body>
</html>
I tried it and it works in FireFox and Opera (although the box is wider
and slightly taller in FireFox than in Opera). However it does not work in
IE (I know, I know). In fact in IE it does not show up AT ALL unless I put
something in the DIV (for example a <p>a</p> - <p></p> does not work). Even
then, it is only as tall and wide as the element I put in it. I've seen
lots of complaints and work around for fixed positioning in IE but I'm using
absolute. Also, I'm specifying all 4 dimensions and the only examples I've
seen have used just two.

Is it just IE or am I doing something wrong? If it's IE, is there a
workaround? If not, how can I fix it?
Thanks.

--
--
Alec S.
alec <@> synetech <.> cjb <.> net
Jul 20 '05
11 2933
Alec S. wrote:
But isn't the Mac version of IE worse? I've seen a lot more nags and
warnings about stuff not being supported on MacIE than WinIE.


IE 5.x for Mac is slightly better than IE 6.x for Windows and
significantly better than IE 5.x for Windows.

Warnings about stuff not working in Mac IE are probably more due to the
reason that people can't be bothered to test in it. It's a bit of a
dinosaur now, used by very few people, and requires expensive proprietary
hardware to run it.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Now Playing ~ ./crash_test_dumm ies_-_mmm_mmm_mmm_mm m.ogg

Jul 20 '05 #11
Toby Inkster wrote:
Alec S. wrote:
But isn't the Mac version of IE worse? I've seen a lot more nags and
warnings about stuff not being supported on MacIE than WinIE.


IE 5.x for Mac is slightly better than IE 6.x for Windows and
significantly better than IE 5.x for Windows.


I'm not sure I agree with this. My experience with MacIE 5 is that it
has excellent CSS1 support (which does make it better than WinIE5), but
is only OK beyond that. A number of CSS2 properties are only partially
supported or quirky, to put it politely.

overflow:hidden , for example, can cause whole sections of a page to
disappear altogether. :( Positioning and floats have issues, too.

I found that working around MacIE 5 weirdness can be just as frustrating
as working around WinIE 6 weirdness.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 20 '05 #12

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

Similar topics

1
7540
by: Trent L | last post by:
Hello, I'm having a problem where a style for a <a> tag isn't working in IE: border : 1px solid red; If you use my code below, you'll see what I mean. In IE6 on WinXP, I'm not seeing a red top and bottom border. My HTML validates. It looks
0
2953
by: | last post by:
New to HTML here. I am trying to put a border after the headings. I got it to work but was wondering if there was an easier more intuitive way of doing this. Code is below. <html> <body> <STYLE type="text/css">
5
1929
by: Richard Shewmaker | last post by:
Hi. I've been using CSS for basic stuff, mostly concerning fonts. I want to get going with using CSS fully. Two days ago I purchased O'Reilly's "Cascading Style Sheets" and "CSS Cookbook." I've been reading them and have tried some really basic stuff and am not having a very good time (lol). I'm feeling really stupid, to be honest. I was able to center an image on a page by mucking about with code primarily from the Cookbook. I only...
1
2675
by: Edward | last post by:
I created a simple CSS layout (code and example below) for bloggin/writing but ran into five issues that I need help with: 1. How do I get rid of the right-margin red line on the last three right-boxes in Internet Explorer? 2. How can I put a 4px margin BETWEEN the right-boxes, "border-top: 4px" didn't do it and if I put in a "margin-top: 4px;" it shows the red underneath instead of the brown background graphic.
3
2516
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't work. Any ideas? Here's the HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
16
3285
by: FuzzyLogik | last post by:
By width, I don't mean weight. I have a row of <li>'s, with a bottom-border. I want the bottom-border to only go 90% of the <li> (centered) Is there any way to do this? I have it in this format: CSS: li {
2
2490
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at the bottom of the page. Please reply....
0
1914
by: sannymak | last post by:
Hello All, I have some problems making the columns 100% and forcing the footer at the bottom. Please refer to the code below and let me know a solution: HTML CODE: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/templatetest.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta...
7
3442
by: GTalbot | last post by:
Hello fellow authoring.stylesheets colleagues, Can someone please explain why the bottom margin of the last inflow block-level child in an overflowed parent should not have its margin reachable. I read and re-read carefully the CSS 2.1 spec and I just can not see why. Related webpages: http://www.gtalbot.org/BrowserBugsSection/MSIE8Bugs/MarginBottomChildNotRendered.html
0
10147
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...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
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
6737
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
5379
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
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
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.