Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS - DIVS without absolute positioning 1

Status
Not open for further replies.

nego78

Programmer
Jun 13, 2004
129
PL
On there is document with styles
On firefox 1.0 it looks but on IE6 it looks bad.

I'm trying to achieve efect

|--------------------|---------|
|#banner | |
|--------------------| #obraz |
|#napis | |
|--------------------|---------|

i wrote

Code:
    <div id="obraz"><img src="obrazek.jpg" width="246" height="151" alt="" /></div>
    <div id="banner">banner dlaczego nie na dole ???</div>
    <div id="napis"><img src="napis.gif" width="478" height="63" alt="" /></div>

and in css

Code:
div#banner {
   text-align: right;
   padding: 28px 256px 0px 0px;
   height: 60px;
}
div#obraz {
   width: 246px;
   height: 151px;
   float: right;
}
div#napis {
   height: 63px; 
   text-align: right;
   padding: 0px 246px 0px 0px;
}

how can i repair it so it'll work in IE ?
but i don't like to use absolute positioning.

thanks in adv.

gry online
 
Why exactly are you applying padding to #napis? That makes the size of that box way too large to fit in the space. While you do use padding to make relatively positioned elements not overlap absolutely positioned, that won't really work with floats. In floats, regular elements should float around them as long as there is some (height, border, margin, padding) of the element on their right or left side.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top