Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css] div obok diva, Jak to zrobić?
Stjudent
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 24.05.2012

Ostrzeżenie: (0%)
-----


Chciałbym umieścić diva obok diva. A dokładniej chodzi o to, by rightBox był obok content1. RightBox ma być po prawej, a content1 po lewej, walcze z tym już drugi dzień i nie mogę sobie poradzić, próbowałem już z ustawianiem display:inline;, float:left in w obu divach, z clear:both, ale bez skutku. Jeśli chodzi o divy to, div middle, jest po to żeby umieścić tło na całym środku, div gornaBelka i dolnaBelka sa po to, żeby umieścic belki z zaokrąglonymi rogami, div content1 grupuje gornabelke, content(tu jest zawartość właściwa) i dolnaBelke, div RightBox ma być boxem po prawej stronie od content1
Obecnie to wygląda tak http://postimage.org/image/6hnv6027t/
css code
Kod
@CHARSET "UTF-8";

body{
    font: normal 100% Helvetica, Arial, sans-serif;
    background-color:#4F4F4F;
    color: #000;
    font-size: 12px;    
    
}

img{
    width:100%;
}



.page{
    margin: 0 auto;
    max-width: 83em;
    background-image: url("../img/strona_tlo.jpg");
    background-position: center;
    background-repeat: repeat-y;
    
}

.banner{
    width:100%;
    background-image: url("../img/banner_tlo.jpg");
    background-position:center;
    background-repeat:no-repeat;
    min-height:30px;
    height:130px;
}

.bannerText{
    margin-left: 0.5em;
    padding-top: 3em;
    font-size: 2em;
}

.menu{
    width:100%;
    font-size:1.25em;
    background-image:url("../img/menu_tlo.png");
    background-position:center;
    background-repeat: repeat-y;
}
a{
    margin: auto 0.5em;
    text-decoration: none;
    color: #000;
}
a:VISITED{

    text-decoration: none;
    color: #000;
}
a:HOVER{
    color: #555;
    text-decoration: underline;
}


.middle{
    min-height:300px;
    min-width:300px;
    max-width: 83em;
    background-image: url("../img/tloPage.png");
    background-position: center;
    background-repeat: repeat-y;
    
}
.content1{
    width:85.5%;
    float:left;
}
.belkaGorna{
    margin-top: 2em;
    margin-left:2em;
    height:25px;
    width:85.5%;
    background-image: url("../img/content1.png");
    background-repeat: no-repeat;
    background-position: left;
    float:left;
}
.content{
    margin-left: 2em;
    min-height:20em;
    float:left;
    width:85.5%;
    background-image: url("../img/content2.png");
    background-position: left;
    background-repeat: repeat-y;
    }
    
.contentHeader{
    margin-left:1em;
    font-size: 1.5em;
    font-family: Georgia,serif;
}
    
    
.belkaDolna{
    margin-left:2em;
    margin-bottom:2em;
    min-height:25px;
    float:left;
    width:85.5%;
    background-image: url("../img/content3.png");
    background-position: left;
    background-repeat: no-repeat;
}


.rightBox{
    float:right;
    min-height:10em;
    width:12.5%;
    background-image: url("../img/rb2.png");
    background-repeat: repeat-y;
    background-position: center;
}
.rightBoxheader{
    text-align: left;
    width:100%;
    background-image: url("../img/rb1.png");
    background-repeat: no-repeat;
    background-position: center;
    
}
.rightBoxTitle{
    font-size: 1.2em;
    margin: 0 0 0 10px;
    text-decoration: underline;
}


.footer{
    clear:both;
    height:100px;
    width:100%;
    background-image:url("../img/stopka_tlo.png");
    background-position: center;
    background-repeat: no-repeat;
    
}


.footerText{
    text-align:center;
    margin: 0 auto;
    font-size: 0.9em;
    height:6em;
    line-height: 4em;
    vertical-align: middle;
    font-weight: normal;
    color:#111;
    }


html code:
Kod
<body>
<div class="page">                 
    
        <jsp:include page="/template/banner.jsp" />    
        <c:import url="/MenuServ" />
        
        <div class="middle">
        <div class="content1">
        <div class="belkaGorna"></div>
        <div class="content">
        <decorator:body />
        </div>
        <div class="belkaDolna" />
        </div>
        <div class="rightBox" ></div>
        </div>
        
        <jsp:include page="/template/footer.jsp" />
        </div>                            
</body>


Jakieś pomysły czemu to nie chce zadziałać(IMG:style_emoticons/default/questionmark.gif) (IMG:style_emoticons/default/snitch.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.10.2025 - 15:27