This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Div alignments when using corner images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Div alignments when using corner images" Watch "Div alignments when using corner images" New topic
Author

Div alignments when using corner images

Deepa Pillai
Greenhorn

Joined: Mar 27, 2008
Posts: 5
I need curved images around the corner ,and am using below code ,

<div class="lfcorner">
<div class="rtcorner">
<div class="lttopcorner">
<div class="toprtcorner">
<div>
<div>AA </div>
<div>BB </div>
</div>
</div>
</div>
</div>
</div>

css for above code,

.btmlfcorner {background: url(lfcorner.gif) 0 100% no-repeat #FFFFFF; }
.btmlrtcorner {background: url(rtcorner.gif) 100% 100% no-repeat}
.lttopcorner {background: url(lttopcorner.gif) 0 0 no-repeat}
.toprtcorner {background: url(oprtcorner.gif) 100% 0 no-repeat; padding:10px}

I need text AA and BB to align in one line ,but BB is moving to next line.If i use the span and with position absolute it works , but i need to achieve this using div.

Please let me know where am going wrong in building images for corners or getting text aligned.


Thanks,
Deepa
Katrina Owen
Sheriff

Joined: Nov 03, 2006
Posts: 1357
    
  17
Hi Deepa,

It looks like you are trying to use divs to replace table cells in a one-to-one map. My guess (even without knowing more about what you are trying to achieve) is that there is an easier way.

div elements are usually block elements by default, and span elements are inline elements.

You can use CSS to tell span elements to display as block elements and div elements to display inline, however if you could post a link to an image of what you are trying to achieve, we might be able to help you do so in an easier way.

Katrina
 
Consider Paul's rocket mass heater.
 
subject: Div alignments when using corner images
 
Similar Threads
Need help editing some css if possible (SOLVED)
centering inside div
using Sprite as background
Problem hiding div within div
Caching rendered html in jsp