Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

Julius's Achievements


Member (2/5)



  1. Does anyone clean/filter session id? Is it necessary?
  2. One more question: when writing html code, it contains quotes. What to do, when my text contains quotes? It's okay when I write articles alone, but if I let someone else write articles, there might be some trouble, I think
  3. browser cached my css file, so I cleared cache and it started working properly
  4. Hello, Why <img style="float: left; margin-right: 5px; padding: 5px; background-color: white; border-radius: 5px;" src="existing_image_500px_wide.jpg" alt="text" width="400" /> returns what I want, but when I transfer all styling to .img_style { here } and in img tag replace style="..." to class="img_style" it doesn't work at all?
  5. Yeah, I was thinking about bbcode. Any other suggestions are welcome
  6. Hello, I made myself a simple blog system, but in my case "simple" becomes difficult when it comes to writing an article. Have you ever seen that movie about how facebook was created (I think it's called "Social network" or something like that)? As a newbie web developer I noticed how "Mark" was writting his blog post. I think it was an textarea, and when he was writing article, he wrote it with html tags, like <p>. So, I have now the same problem: when I'm writing article, I have to write it with all div's and p's and a's and img's and so on. I want to avoid that. Few ideas did pop to my head: use preg_replace for some elements, and set up some javascript WYSIWYG editor (but i really don't want it, and can't explain why, I just don't like it). I have a couple of css classes for images, both of them resizes images, one resizes it a lot, other not so much, both make them smaller. One class is for image to be on the left, so the text would wap that image from the right. After paragraph I must clear floats with css class. Other image class just takes full width available and if image is bigger that that available width - it resizes image. So no need to clear floats. How can I make my life easier when I'm writing article to my blog?
  7. I guess you didn't understand my problem. Yes, I did run that method. It gives me an error because of that variable (not defined). How can I reach it? I know that in codeigniter's view file you can just type echo $this -> var; or something like that, and the variable value is shown
  8. Hi, I'm trying to write myself a tiny MVC framework and having some trouble: <?php class One { public function main ( ) { $var = 'Hello'; include ( 'file.php' ); } } ?> file.php: <?php echo $var; ?> This doesn't work. Is there any way without setting that variable to global, to reach it like that?
  9. Thank you very much for your help
  10. I was playing around with this pattern for about an hour, and the thing that I did wrong was adding slash right before ], not after ^. But what works faster: :alnum: or all given values? or it doesn't really matter in this case? Thank you for your help, guys!
  11. Heres what I have so far: $url = str_replace ( "/index.php/", "", $_SERVER [ 'REQUEST_URI' ] ); $url = preg_replace('#([^A-Za-z0-9_-])#', '', $url); echo $url; I want to replace EVERYTHING in my url EXCEPT a-zA-Z0-9_- and forward slash. How can I escape forward slash in my pattern?
  12. Well, I think I fixed it. I just moved anchor inside span. Removed margin, added some padding here and there and there it is. Will have to get back to this, because when I zoom in, sizes of span and those icons padding appears to be different while when zoom is set to 100%, i can't see any difference.
  13. Well, now elements are in the same line, but everything looks crappy now. Images are 16x16px, I added some padding (red color) so that the element would be bigger and clearly visible. But now: 1. Somethings wrong with padding, I just wanted it to be about 5px outside icon in all directions, but when display was set to block, 13px of padding gave me what I wanted 2. How can I put that element that is on the spans left (that icon with padding) to be on spans left, like it is in the first attached file? Thanks for helping me out EDIT: .icon { background-color: red; background-repeat: no-repeat; background-position: center center; padding: 1px 15px 5px 15px; margin-right: 5px; } take a look at the padding. It gives me pretty much what I want (like in first attached file), but why the numbers are so strange?
  14. heres the html <div class="grid_12 topbar"> <div class="fl brand"> <h1><a href="#">Testas</a></h1> </div> <div class="fr user-menu"> <ul> <li> <a href="#" class="round icon ic-user"></a> <span class="mini-info">Welcome, Julius</span> </li> <li><a href="#" class="round icon ic-settings"></a></li> <li><a href="#" class="round icon ic-messages"></a></li> <li><a href="#" class="round icon ic-logout"></a></li> </ul> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="clear"></div> <!-- TOP BAR END --> CSS .grid_12 { float: left; width: 940px; } .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 { margin: 0 10px; } .topbar { height: 60px; background-color: #fff; } .fl { float: left; } .fr { float: right; } .user-menu ul { list-style-type: none; } .user-menu li a { display: block; float: left; } .round { border-radius: 5px; } .icon { background-color: red; background-repeat: no-repeat; background-position: center; padding: 13px; margin-right: 5px; } .ic-user { background-image: url('../images/icons/ic_user.png'); } .ic-settings { background-image: url('../images/icons/ic_settings.png'); } .ic-messages { background-image: url('../images/icons/ic_mail.png'); } .ic-logout { background-image: url('../images/icons/ic_cancel.png'); } .mini-info { display: block; margin: 0px; background-color: black; font-size: 12px; color: white; padding: 4px; border-radius: 7px 5px 5px 7px; } display: block; gives me no space between those two elements, and that is what I want, so if we will fix this issue with span and there will be a gap between those two elements, I hope you will help me merging them again, like it is now
  15. Didn't help. I tried in .mini-info set display to inline, inline-block, same did to li a, nothing. It still causes a new line after it
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.