HTML cell background

Posted:
in Genius Bar edited January 2014
Is there a way to get a background to repeat vertically in a column?



I'm working my own forums, but I want to have how it's gong to look down first. I want to display all my text on this white blob



http://mobocracy.no-ip.com:2222/intouch/test.php



My background to the row that I have text in is that white-ish color you see peaking out to the top and bottom of my text. (you can only see it at the sides because it blends in other places.)



I know this is because I'm using an image to make the sides that is only 10px in length. But it doesn't matter on the length, I need it to be repeating. If anyone needs anymore explanation tell me and I'll rethink how to express myself better.

Comments

  • Reply 1 of 6
    karl kuehnkarl kuehn Posts: 756member
    This is easy with CSS. W3school.com has a page about it that is part of their learning CSS series (so you can learn how to use it).
  • Reply 2 of 6
    ast3r3xast3r3x Posts: 5,012member
    Ok, then, I'm doing a left and a right image repeating, I got it to work with a table inside of a table...is there another way? Can you have two classes in one tag?



    Also...why does what I see in safari come up completely different in win IE and even more different in opera?
  • Reply 3 of 6
    ghost_user_nameghost_user_name Posts: 22,667member
    Quote:

    Originally posted by ast3r3x

    Ok, then, I'm doing a left and a right image repeating, I got it to work with a table inside of a table...is there another way? Can you have two classes in one tag?



    Also...why does what I see in safari come up completely different in win IE and even more different in opera?




    Your server is downas of this post; so, I can't see what you're trying to achieve.



    You can apply multiple classes easily. Here's one way it could look:



    Code:


    .style1 {

    font-weight: bold;

    }

    .style2 {

    color: #f00;

    }



    <span class="style1 style2">lalala</span>



    Windows IE is the worst worst WORST I repeat worst browser for handling CSS. It breaks all over the place, especially if you have anything that uses the > selector or multiple class names. You can never expect IE to give you truly accurate rendering of any CSS beyond basic font and color stylings.



    Many web developers hold Internet Explorer as the sole reason advanced technologies like CSS haven't truly taken flight yet. It is the single most backwards, problematic thorn in the Information Superhighway. A few simple Google searches will display tons of pages outlining the problems with IE's renderings and ways people have tried to figure out to get around them. From PHP and JavaScript browser identification sniffers to bugs in how IE reads the CSS file itself, there are lots of methods developers have been forced to create to hand-hold Microsoft's piece-of-shit software around CSS. But I digress.



    The same goes for Opera but to a lesser degree. Opera, like IE, uses a propietary closed-source rendering engine and it doesn't have the wide testing and developer base that projects like Mozilla and Safari/Konqueror have. I've heard pretty good things about Opera's CSS handling. Years ago, it was in the lead, handling CSS better than Netscape even. Today, I've heard it's still better than IE, but I don't know much beyond that.



    Where was I going with this? Oh yeah: test your CSS in Safari and a Mozilla-branded browser. Ignore IE or do what I do and use a PHP script to sniff out IE users and warn them in advance about how their browser is destroying progress on the Internet and that you refuse to write hackneyed code to support such an atrocity. There are still some discrepencies between Safari and Moz, but they both *easily* produce the most compliant renderings that the other browsers will be trying to catch up to in the future.
  • Reply 4 of 6
    ast3r3xast3r3x Posts: 5,012member
    Sorry that my server (my computer) was down, one of my brothers let my computer run out of juice. Should be up all night now.



    This is going to be a nightmare I can tell...because I'm making a website where basically I'll be the only mac user.



    Maybe I just scrap making my own forums for now, and just redesign phpbb2.



    Code:


    tr.displaydown

    {

    position: absolute;

    background-image:

    url("images/display_left.png");

    background-repeat: repeat-y

    }



    table.display

    {

    position: absolute;

    top: 150px;

    left: 50px;

    background-image:

    url("images/display_background.png");

    background-repeat: repeat

    }







    Code:


    Line 1--> <table class="display" border="" cellspacing="0" cellpadding="0">

    Line 2--> <tr background="images/display_top.png">

    Line 3--> <th class="displaydown" scope="col"><div align="left"><img src="images/display_top_left.png"></div></th>







    What do I have to change to this code to get get Line 2 to have that image repeated vertically (y axis)?



    I'm getting a CSS book tomorrow so hopefully that is less questions I'll need to ask. Anyone hear anything good about Core CSS: Cascading Style Sheets?
  • Reply 5 of 6
    Quote:

    Originally posted by Brad

    You can never expect IE to give you truly accurate rendering of any CSS beyond basic font and color stylings.





    Where was I going with this? Oh yeah: test your CSS in Safari and a Mozilla-branded browser. Ignore IE or do what I do and use a PHP script to sniff out IE users and warn them in advance about how their browser is destroying progress on the Internet and that you refuse to write hackneyed code to support such an atrocity.



    I have to disagree with this. Yes, IE on Windows is screwey with CSS, but in no way whatsoever is it so broken to keep you from using CSS as your primary device for layout. It simply takes a bit of research and some slight tweaks. Check out the two sites in my sig - they both render, if not exactly, then as close as anyone would care in IE on windows and Safari on Mac. And I do a minimum of tweaks compared to what is out there.



    In regards to doing a forum, I think you hit the nail on the head when you mention phpbb - why reinvent the wheel when it already exists, and it kicks arse? Unless it is purely for learning - which has a lot of value in and of itself...



    Sorry - no specific CSS help here - but it is Friday and my brain is swimming right now.
  • Reply 6 of 6
    ast3r3xast3r3x Posts: 5,012member
    Yeah...well I was going to make my own forum, because I wanted to do something difficult with PHP. I still might, we'll have to see how good I can get phpbb looking.



    Are ai's smilies copyrighted?
Sign In or Register to comment.