Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML]Problem z znakiem specjalnym przed linkiem.
Rajdon
post
Post #1





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

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


Witam, mam problem z znakiem specjalnym przed linkiem, za każdym razem efekt na stronie jest taki, ze znak specjalny jest w jednym wierszu a link w 2. Oczywiście chodzi o to żeby były w jednym.


Fragment kodu:
  1. <TR>
  2. <TD class=main_menu onmouseover="bgColor='#f2f2f2'" onmouseout="bgColor='#ffffff'" bgColor=#ffffff>&raquo;<a href="...



Efekt jest mniej wiecej taki:

»
Link

Proszę o pomoc.
Go to the top of the page
+Quote Post
Fifi209
post
Post #2





Grupa: Zarejestrowani
Postów: 4 655
Pomógł: 556
Dołączył: 17.03.2009
Skąd: Katowice

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


a jak dla "a" dodasz display: inline?
Go to the top of the page
+Quote Post
flashdev
post
Post #3





Grupa: Zarejestrowani
Postów: 812
Pomógł: 117
Dołączył: 2.12.2008

Ostrzeżenie: (10%)
X----


Może link jest za długi i się nie mieści?
Zawsze możesz wymusić nie łamanie wiersza przy użyciu tagów <nobr> ... </nobr>
Go to the top of the page
+Quote Post
Rajdon
post
Post #4





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

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


Właśnie że używam <nobr>...</nobr> i nic dalej mam:
?
link

(IMG:style_emoticons/default/sciana.gif)


PS; <p style="display:inline;"></p> też nie działa ;/

Ten post edytował Rajdon 8.07.2010, 19:11:20
Go to the top of the page
+Quote Post
flashdev
post
Post #5





Grupa: Zarejestrowani
Postów: 812
Pomógł: 117
Dołączył: 2.12.2008

Ostrzeżenie: (10%)
X----


Cytat(Rajdon @ 8.07.2010, 20:06:28 ) *
Właśnie że używam <nobr>...</nobr> i nic dalej mam:
?
link

(IMG:style_emoticons/default/sciana.gif)


PS; <p style="display:inline;"></p> też nie działa ;/


  1. ť
  2. <a href="http://google.pl">link</a>
  3. <br /><br />
  4. <nobr>ť
  5. <a href="http://google.pl">link</a></nobr>


Musisz pokazać kod. Wróżek na tym forum raczej nie ma.
Go to the top of the page
+Quote Post
Rajdon
post
Post #6





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

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


  1. <TR>
  2. <TD class=main_menu onmouseover="bgColor='#f2f2f2'" onmouseout="bgColor='#ffffff'" bgColor=#ffffff><nobr>&raquo;<a href="#" title="Gry na Xbox 360" class=main_menu_lnk >Xbox 360</a></nobr></TD>
  3. </TR>


Próbowałem też z <nobr> przed TD i to samo ;/
Go to the top of the page
+Quote Post
bastard13
post
Post #7





Grupa: Zarejestrowani
Postów: 664
Pomógł: 169
Dołączył: 8.01.2010
Skąd: Kraków

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


To może pokażesz jakie masz ustawione style w klasach main_menu_lnk i main_menu.
Go to the top of the page
+Quote Post
Rajdon
post
Post #8





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

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


  1. }
  2. .main_menu {
  3. border-top-width: 1px;
  4. border-top-style: solid;
  5. border-right-style: none;
  6. border-bottom-style: none;
  7. border-left-style: none;
  8. border-top-color: #E8EBEF;
  9. font-family: Arial, Helvetica, sans-serif;
  10. color: #454545;
  11. text-align: left;
  12. vertical-aligment: bottom;
  13. font-size: 11px;
  14. height: 17px;
  15. padding-left: 4px;
  16. padding-bottom: 2px;
  17. }
  18. .main_menu_lnk:link{
  19. color: #454545;
  20. display: block;
  21. width: 100%;
  22. text-decoration: none;
  23. }
Go to the top of the page
+Quote Post
cniak
post
Post #9





Grupa: Zarejestrowani
Postów: 169
Pomógł: 12
Dołączył: 16.09.2009

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


Cytat(Rajdon @ 8.07.2010, 20:35:35 ) *
  1. }
  2. .main_menu {
  3. border-top-width: 1px;
  4. border-top-style: solid;
  5. border-right-style: none;
  6. border-bottom-style: none;
  7. border-left-style: none;
  8. border-top-color: #E8EBEF;
  9. font-family: Arial, Helvetica, sans-serif;
  10. color: #454545;
  11. text-align: left;
  12. vertical-aligment: bottom;
  13. font-size: 11px;
  14. height: 17px;
  15. padding-left: 4px;
  16. padding-bottom: 2px;
  17. }
  18. .main_menu_lnk:link{
  19. color: #454545;
  20. display: block;
  21. width: 100%;
  22. text-decoration: none;
  23. }


Troche masz tutaj dziwnie to zrobione, używaj skrótów to będziesz lepiej to widzieć, dlaczego masz .main_menu_lnk:link[b] a nie .main_menu_lnk a:link[/b]? Atrybut :link służy do pokazywania odwiedzonych już odnośników (IMG:style_emoticons/default/smile.gif) Na twoim miejscu zostawiłbym :link a ustawił kolor #454545 jako standard dla a i ustalił dla linków już odwiedzonych - :visited jakiś inny kolor (IMG:style_emoticons/default/smile.gif) Też nie wiem po co ustawiasz taki sam kolor dla .main_menu_lnk:link jak i .main_menu.

Tutaj masz w skrócie to jak moim zdaniem powinno Ci działać:

.main_menu {
border-top: 1px solid #E8EBEF;
font-family: Arial, Helvetica, sans-serif;
color: #454545;
text-align: left;
vertical-aligment: bottom;
font-size: 11px;
height: 17px;
padding-left: 4px;
padding-bottom: 2px;
}


.main_menu_lnk a:link{
color: #454545;
display: inline;
width: 100%;
text-decoration: none;
}



Jak widze w kodzie twoim takie cos:
  1. <TR>
  2. <TD class=main_menu onmouseover="bgColor='#f2f2f2'" onmouseout="bgColor='#ffffff'" bgColor=#ffffff><nobr>?<a href="#" title="Gry na Xbox 360" class=main_menu_lnk >Xbox 360</a></nobr></TD>
  3. </TR>


To poprostu zamiast onmouseover i onmouseout zrobiłbym to w CSS:
  1. main_menu td {
  2. background: white;
  3. }
  4. main_menu td:hover {
  5. background: #f2f2f2;
  6. }

white = #ffffff jak dobrze pamietam (IMG:style_emoticons/default/smile.gif)


Jeżeli nie chcesz co chwile powtarzać ? zrobiłbym to za pomocą małego obrazka:
(IMG:http://gospodarka.gazeta.pl/i/obrazki/wiadomosci/raquo_archiwum.gif)

i dodać to jako background:

main_menu_lnk a {
background: transparent url (ścieżka obrazka.png) no-repeat center left;
padding-left: 16px;
}

padding-left: 16 px; - odstęp tekstu 16 px od lewej strony tak aby był widoczny ten obrazek ( który ma 14px)


Ten post edytował cniak 8.07.2010, 20:18:48
Go to the top of the page
+Quote Post
Rajdon
post
Post #10





Grupa: Zarejestrowani
Postów: 73
Pomógł: 0
Dołączył: 7.06.2009

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


Robiłem tak jak pisałeś i nic, próbowałem przekształcać na różne sposoby display niestety bez fektu. Na 100 % jest to coś z main_menu_link bo po usunięciu tego z html wszytko działa.

Swoją drogę zastanawia mnie dlaczego nie działa <nobr>...</nobr> (IMG:style_emoticons/default/questionmark.gif) ?

hmmm nikt już nie ma pomysłu (IMG:style_emoticons/default/questionmark.gif)

ps; moge zrobić coś takiego <a href="#">?ANCHOR TEXT</a> ale czy to nie wpłynei na gorsze pozycjonowanie strony ? (IMG:style_emoticons/default/blinksmiley.gif)

Ten post edytował Rajdon 8.07.2010, 23:48:49
Go to the top of the page
+Quote Post

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: 24.08.2025 - 00:41