• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Div alignments when using corner images

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic