Results 1 to 10 of 10
  1. #1
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default omi. I've forgotten.... +REP

    Hey guys, I've completely forgotten, it's like a mind wipe.

    If I had three images like this

    [image one] TEXT OVER THE BACKGROUND OF image 2 [image3]

    So it kinda makes it like a (TEXT HERE) box, rounded.

    How would I do it with a div?

    http://clubhabbo.net/

    Like their nav, and how would I align the text to the middle vertically?

    Thanks +REP

    drink up this bottle of yeah
    and P A I N T your body on me


  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    i dnt get what u mean??

    Surely its just like

    <div id="container"><div background><div with text><div again>
    </div>
    or summin :S:S
    Then float them or w/e..

  3. #3
    Join Date
    Sep 2008
    Location
    UK
    Posts
    3,670
    Tokens
    0

    Latest Awards:

    Default

    Slice up the corners, left and right, then slice up the middle section, make the left corner float: left; and do the same with the middle section but give it a fixed width, then after the middle section make the right corner float: left; so it'll sit next to eachother.

    Make sense?
    Back for a while.

  4. #4
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Like on Clubhabbos nav, the corners are rounded, and the text is vertically aligned to the middle... how is that done with DIVs?

    I'll try that, thanks excellent.

    drink up this bottle of yeah
    and P A I N T your body on me


  5. #5
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by SyrupyMonkey View Post
    Like on Clubhabbos nav, the corners are rounded, and the text is vertically aligned to the middle... how is that done with DIVs?

    I'll try that, thanks excellent.
    Are you sure it's not the Image?

    If not;
    http://www.webcredible.co.uk/user-fr...-borders.shtml

  6. #6
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    I feel like such a noob now. LOL

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body,td,th {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: x-small;
    	color: #FFFFFF;
    }
    body {
    	background-color: #000000;
    }
    .navcontain {
    clear: both;
    height: 30px; 
    width: 800px;
    }
    .navleft {
    background:url(images/index_01.gif);
    float: left;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    
    .navmid {
    background: url(images/index_03.gif);
    float: left;
    padding: 8px;
    height: 22px; 
    width: 770px; }
    
    .navright {
    background: url(images/index_05.gif);
    float: right;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    -->
    </style></head>
    
    <body>
    <div class="navcontain">
    <div class="left"></div>
    <div class="navmid">Hello lol</div>
    <div class="navright"></div>
    </div>
    
    </body>
    </html>
    There's my code, heres wut it shud look like and wut it does look like:


    http://img66.imageshack.us/img66/14/loltd9.png

    drink up this bottle of yeah
    and P A I N T your body on me


  7. #7
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by SyrupyMonkey View Post
    I feel like such a noob now. LOL

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body,td,th {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: x-small;
    	color: #FFFFFF;
    }
    body {
    	background-color: #000000;
    }
    .navcontain {
    clear: both;
    height: 30px; 
    width: 800px;
    }
    .navleft {
    background:url(images/index_01.gif);
    float: left;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    
    .navmid {
    background: url(images/index_03.gif);
    float: left;
    padding: 8px;
    height: 22px; 
    width: 770px; }
    
    .navright {
    background: url(images/index_05.gif);
    float: right;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    -->
    </style></head>
    
    <body>
    <div class="navcontain">
    <div class="left"></div>
    <div class="navmid">Hello lol</div>
    <div class="navright"></div>
    </div>
    
    </body>
    </html>
    There's my code, heres wut it shud look like and wut it does look like:


    http://img66.imageshack.us/img66/14/loltd9.png
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body,td,th {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: x-small;
    	color: #FFFFFF;
    }
    body {
    	background-color: #000000;
    }
    .navcontain {
    clear: both;
    height: 30px; 
    width: 800px;
    }
    .navleft {
    background: url(images/index_01.gif);
    float: left;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    
    .navmid {
    background: url(images/index_03.gif);
    float: left;
    padding: 8px;
    height: 14px; 
    width: 770px; }
    
    .navright {
    background: url(images/index_05.gif);
    float: left;
    height: 30px; 
    width: 15px; 
    background-repeat: none;}
    -->
    </style></head>
    
    <body>
    <div class="navcontain">
    <div class="navleft"></div>
    <div class="navmid">Hello lol</div>
    <div class="navright"></div>
    </div>
    
    </body>
    </html>
    I've made a few corrections, haven't tested it though. It's probably not 100% correct, but should be closer.

  8. #8
    Join Date
    Sep 2007
    Posts
    220
    Tokens
    175

    Default

    I suggest just saving that whole rounded rectangle as an image, then use that as a div bd. And use padding to align the text to correctly placed left. And to align text, in css use "text-align: center or w/e;"
    Kindest Regards,
    -- Brad







    [People Will Bow To Me]

  9. #9
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by Tylenol View Post
    I suggest just saving that whole rounded rectangle as an image, then use that as a div bd. And use padding to align the text to correctly placed left. And to align text, in css use "text-align: center or w/e;"
    That's only for a fixed width. A new div class and new background image would be needed for each div that has a different width.

  10. #10
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    It's really not that hard?

    A container, three divs in it. Left one is the left of the rectangle, floated left and fixed width. Middle one is the background of the middle part repeat-x and no fixed width floated left, and the third one the same as the one except the other image...

    the container would be 100% width and the same height as the nav bar with no padding.

    Cba to write the code for it, unless you're that desperate.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •