Skocz do zawartości
  • 0

Problem


Peridot

Pytanie

Witam mam otóż taki problem: http://prntscr.com/h5egbk Chodzi o to że to powinno być obok siebie (mniej więcej w tych czerwonych polach) a nie na sobie :/

 

Plik index.html: https://code.skript.pl/ljIt6whR/

Plik style.css: https://code.skript.pl/HQse7tsA/

 

@Ixidi @bopke @boleknowak

Edytowane przez McKoxu
Odnośnik do komentarza
https://skript.pl/temat/22659-problem/
Udostępnij na innych stronach

11 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

<!DOCTYPE HTML>
<html lang=pl>
<head>
    <meta charset="utf-8"/>
    <title>Strona Serwera</title>
    <link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
    <div id="head">
        <div id="headmenu">
            <center>
                <a href="index.html" class="titlelink">
                    <div class="home">TEST<div>
                </a>
                <a href="indexx.html" class="titlelink2">
                    <div class="sklep">TEST<div>
                </a>
                <a href="indexxx.html" class="titlelink3">
                    <div class="regulamin">TEST<div>
                </a>
            </center>
            <div style="clear: both;"></div>
        </div>
    </div>
</body>
</html>

 

Nie potrzebnie robisz klasy typu titlelink, titlelink2, titlelink3. Wystarczy zrobić jedną klasę.

A co do tego stwórz klasę np. "link". Usuń <center>, i dodaj to klasy "link" styl "display:inline-block;"

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154145
Udostępnij na innych stronach

  • 0
3 minuty temu, adiand napisał:

<!DOCTYPE HTML>
<html lang=pl>
<head>
    <meta charset="utf-8"/>
    <title>Strona Serwera</title>
    <link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
    <div id="head">
        <div id="headmenu">
            <center>
                <a href="index.html" class="titlelink">
                    <div class="home">TEST<div>
                </a>
                <a href="indexx.html" class="titlelink2">
                    <div class="sklep">TEST<div>
                </a>
                <a href="indexxx.html" class="titlelink3">
                    <div class="regulamin">TEST<div>
                </a>
            </center>
            <div style="clear: both;"></div>
        </div>
    </div>
</body>
</html>

 

Nie potrzebnie robisz klasy typu titlelink, titlelink2, titlelink3. Wystarczy zrobić jedną klasę.

A co do tego stwórz klasę np. "link". Usuń <center>, i dodaj to klasy "link" styl "display:inline-block;"

Teraz mam takie coś: http://prntscr.com/h5epnu 

 

index.html: https://code.skript.pl/ESK2syuZ/

style.css: https://code.skript.pl/RAbCcEUM/

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154147
Udostępnij na innych stronach

  • 0

Usuń diwy w znacznikach <a>

<div id="head">
        <div id="headmenu">
                <a href="index.html" class="titlelink">1</a>
                <a href="indexx.html" class="titlelink2">2</a>
                <a href="indexxx.html" class="titlelink3">3</a>
        </div>
    </div>

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154150
Udostępnij na innych stronach

  • 0
1 minutę temu, adiand napisał:

Usuń diwy w znacznikach <a>

<div id="head">
        <div id="headmenu">
                <a href="index.html" class="titlelink">1</a>
                <a href="indexx.html" class="titlelink2">2</a>
                <a href="indexxx.html" class="titlelink3">3</a>
        </div>
    </div>

Ale te divy to są przyciski ...

4 minuty temu, JPablo napisał:

Przydałby się link, dałoby radę wtedy inspektorem to zrobić i podać Ci rozwiązanie (na PW)

Chwilka

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154151
Udostępnij na innych stronach

  • 0
6 minut temu, McKoxu napisał:

Ale te divy to są przyciski ...

Chwilka

To daj tym diwom styl "display:inline;" lub "display:inline-block;"

 

//Błąd "ortograficzny" @JPablo

Edytowane przez JPablo
Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154153
Udostępnij na innych stronach

  • 0
8 minut temu, JPablo napisał:

Przydałby się link, dałoby radę wtedy inspektorem to zrobić i podać Ci rozwiązanie (na PW)

Masz: http://mckoxu.ugu.pl/

4 minuty temu, adiand napisał:

To daj tym diwą styl "display:inline;" lub "display:inline-block;"

Nic :/

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154154
Udostępnij na innych stronach

  • 0
2 minuty temu, McKoxu napisał:

<meta charset="utf-8">
<a href="#">
    <div class="">
        PIERWSZY ODSYŁACZ
    </div>
</a>
<a href="#">
    <div class="">
        DRUGI ODSYŁACZ
    </div>
</a>
<a href="#">
    <div class="">
        TRZECI ODSYŁACZ
    </div>
</a>
<style>
    a {
        display: inline-block;
        text-decoration: none;
    }
</style>
Więcej nie pomogę :-(

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154155
Udostępnij na innych stronach

  • 0

Zmień to na taki kod aby odnośniki były w klasie Home

<div class="home"><a href="index.html" class="titlelink">Menu1</a>
<a href="index.html" class="titlelink">Menu2</a>
<a href="index.html" class="titlelink">Menu3</a>

 

A pozostałe wywal, wtedy mi się pokazuje Menu1 Menu2 Menu3 w jednej linii a nie pod sobą

Odnośnik do komentarza
https://skript.pl/temat/22659-problem/#findComment-154156
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...